docs: add comments

This commit is contained in:
JanNiklas Grabowski
2024-09-27 13:33:23 +02:00
parent 617d658d99
commit 44e46be8a0
4 changed files with 4 additions and 0 deletions

View File

@@ -205,6 +205,7 @@ class RoomContextActionService: NSObject, RoomContextActionServiceProtocol {
private func getLeaveAlertController() -> UIAlertController {
if LeaveRoomHelper.canLeaveRoom(self.session, self.room) {
// BWI: #6526 change leave room info
var message = ""
if LeaveRoomHelper.isOnlyMember(self.room) {
message = BWIL10n.roomParticipantsLeaveAndDeletePromptMsg

View File

@@ -79,6 +79,7 @@ final class RoomInfoListViewController: UIViewController {
private func getLeaveAlertController() -> UIAlertController {
if self.viewModel.canLeaveRoom() {
// BWI: #6526 change leave room info
var message = ""
if viewModel.isOnlyMember() {
message = BWIL10n.roomParticipantsLeaveAndDeletePromptMsg

View File

@@ -127,6 +127,7 @@ final class RoomInfoListViewModel: NSObject, RoomInfoListViewModelType {
return LeaveRoomHelper.canLeaveRoom(self.session, self.room)
}
// BWI: #6526 change leave room info
func isOnlyMember() -> Bool {
return LeaveRoomHelper.isOnlyMember(self.room)
}

View File

@@ -38,6 +38,7 @@ protocol RoomInfoListViewModelType {
func process(viewAction: RoomInfoListViewAction)
func canLeaveRoom() -> Bool
// BWI: #6526 change leave room info
func isOnlyMember() -> Bool
func isDirectRoom() -> Bool
func isPersonalNotesRoom() -> Bool