mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
Merge branch 'master' into develop
# Conflicts: # Podfile.lock # Riot/Modules/Room/RoomViewController.m
This commit is contained in:
@@ -539,11 +539,13 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
[self->currentAlert dismissViewControllerAnimated:NO completion:nil];
|
||||
|
||||
self->currentAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomErrorJoinFailedTitle] message:msg preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertController *errorAlert = [UIAlertController alertControllerWithTitle:[MatrixKitL10n roomErrorJoinFailedTitle]
|
||||
message:msg
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[self->currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[errorAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n ok]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
self->currentAlert = nil;
|
||||
|
||||
@@ -553,7 +555,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}
|
||||
}]];
|
||||
|
||||
[self presentViewController:self->currentAlert animated:YES completion:nil];
|
||||
[self presentViewController:errorAlert animated:YES completion:nil];
|
||||
currentAlert = errorAlert;
|
||||
}
|
||||
|
||||
#pragma mark - Sticky Headers
|
||||
@@ -1202,13 +1205,13 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}
|
||||
|
||||
// confirm leave
|
||||
currentAlert = [UIAlertController alertControllerWithTitle:title
|
||||
message:message
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
UIAlertController *leavePrompt = [UIAlertController alertControllerWithTitle:title
|
||||
message:message
|
||||
preferredStyle:UIAlertControllerStyleAlert];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
[leavePrompt addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1218,8 +1221,8 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n leave]
|
||||
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||
[leavePrompt addAction:[UIAlertAction actionWithTitle:[VectorL10n leave]
|
||||
style:UIAlertActionStyleDefault handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1280,8 +1283,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"];
|
||||
[self presentViewController:currentAlert animated:YES completion:nil];
|
||||
[leavePrompt mxk_setAccessibilityIdentifier:@"LeaveEditedRoomAlert"];
|
||||
[self presentViewController:leavePrompt animated:YES completion:nil];
|
||||
currentAlert = leavePrompt;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1836,11 +1840,11 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
[currentAlert dismissViewControllerAnimated:NO completion:nil];
|
||||
|
||||
currentAlert = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
UIAlertController *actionSheet = [UIAlertController alertControllerWithTitle:nil message:nil preferredStyle:UIAlertControllerStyleActionSheet];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsStartChatWith]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsStartChatWith]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1852,9 +1856,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsCreateEmptyRoom]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsCreateEmptyRoom]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1866,9 +1870,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsJoinRoom]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomRecentsJoinRoom]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1882,10 +1886,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
if (self.mainSession.callManager.supportsPSTN)
|
||||
{
|
||||
[currentAlert addAction:[UIAlertAction
|
||||
actionWithTitle:[VectorL10n roomOpenDialpad]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:[VectorL10n roomOpenDialpad]
|
||||
style:UIAlertActionStyleDefault
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1898,9 +1901,9 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}]];
|
||||
}
|
||||
|
||||
[currentAlert addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
[actionSheet addAction:[UIAlertAction actionWithTitle:[MatrixKitL10n cancel]
|
||||
style:UIAlertActionStyleCancel
|
||||
handler:^(UIAlertAction * action) {
|
||||
|
||||
if (weakSelf)
|
||||
{
|
||||
@@ -1910,11 +1913,12 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
|
||||
}]];
|
||||
|
||||
[currentAlert popoverPresentationController].sourceView = plusButtonImageView;
|
||||
[currentAlert popoverPresentationController].sourceRect = plusButtonImageView.bounds;
|
||||
[actionSheet popoverPresentationController].sourceView = plusButtonImageView;
|
||||
[actionSheet popoverPresentationController].sourceRect = plusButtonImageView.bounds;
|
||||
|
||||
[currentAlert mxk_setAccessibilityIdentifier:@"RecentsVCCreateRoomAlert"];
|
||||
[self presentViewController:currentAlert animated:YES completion:nil];
|
||||
[actionSheet mxk_setAccessibilityIdentifier:@"RecentsVCCreateRoomAlert"];
|
||||
[self presentViewController:actionSheet animated:YES completion:nil];
|
||||
currentAlert = actionSheet;
|
||||
}
|
||||
|
||||
- (void)openDialpad
|
||||
@@ -2008,7 +2012,7 @@ NSString *const RecentsViewControllerDataReadyNotification = @"RecentsViewContro
|
||||
}
|
||||
|
||||
// Check whether the user has already joined the selected public room
|
||||
if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession roomWithRoomId:publicRoom.roomId])
|
||||
if ([self.recentsDataSource.publicRoomsDirectoryDataSource.mxSession isJoinedOnRoom:publicRoom.roomId])
|
||||
{
|
||||
// Open the public room
|
||||
[self showRoomWithRoomId:publicRoom.roomId
|
||||
|
||||
@@ -20,7 +20,12 @@ import Foundation
|
||||
public class RecentsListService: NSObject, RecentsListServiceProtocol {
|
||||
|
||||
private weak var session: MXSession?
|
||||
public private(set) var mode: RecentsDataSourceMode
|
||||
public private(set) var mode: RecentsDataSourceMode {
|
||||
didSet {
|
||||
refresh()
|
||||
}
|
||||
}
|
||||
|
||||
public private(set) var query: String?
|
||||
public private(set) var space: MXSpace?
|
||||
|
||||
@@ -427,7 +432,7 @@ public class RecentsListService: NSObject, RecentsListServiceProtocol {
|
||||
private func updateDirectFetcher(_ fetcher: MXRoomListDataFetcher, for mode: RecentsDataSourceMode) {
|
||||
switch mode {
|
||||
case .home:
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .lowPriority]
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = [.invited, .favorited, .lowPriority]
|
||||
case .people:
|
||||
fetcher.fetchOptions.filterOptions.notDataTypes = [.lowPriority]
|
||||
default:
|
||||
|
||||
@@ -60,6 +60,18 @@ public class MockRoomSummary: NSObject, MXRoomSummaryProtocol {
|
||||
|
||||
public var highlightCount: UInt = 0
|
||||
|
||||
public var hasAnyUnread: Bool {
|
||||
return localUnreadEventCount > 0
|
||||
}
|
||||
|
||||
public var hasAnyNotification: Bool {
|
||||
return notificationCount > 0
|
||||
}
|
||||
|
||||
public var hasAnyHighlight: Bool {
|
||||
return highlightCount > 0
|
||||
}
|
||||
|
||||
public var isDirect: Bool {
|
||||
return isTyped(.direct)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user