mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 19:34:25 +02:00
Merge branch 'develop' into steve/bubbles_move_files
This commit is contained in:
@@ -367,7 +367,7 @@
|
||||
"notice_room_join" = "%@ joined";
|
||||
"notice_room_leave" = "%@ left";
|
||||
"notice_room_reject" = "%@ rejected the invitation";
|
||||
"notice_room_kick" = "%@ kicked %@";
|
||||
"notice_room_kick" = "%@ removed %@";
|
||||
"notice_room_unban" = "%@ unbanned %@";
|
||||
"notice_room_ban" = "%@ banned %@";
|
||||
"notice_room_withdraw" = "%@ withdrew %@'s invitation";
|
||||
@@ -399,7 +399,7 @@
|
||||
"notice_room_join_by_you" = "You joined";
|
||||
"notice_room_leave_by_you" = "You left";
|
||||
"notice_room_reject_by_you" = "You rejected the invitation";
|
||||
"notice_room_kick_by_you" = "You kicked %@";
|
||||
"notice_room_kick_by_you" = "You removed %@";
|
||||
"notice_room_unban_by_you" = "You unbanned %@";
|
||||
"notice_room_ban_by_you" = "You banned %@";
|
||||
"notice_room_withdraw_by_you" = "You withdrew %@'s invitation";
|
||||
@@ -479,7 +479,7 @@
|
||||
"num_members_one" = "%@ user";
|
||||
"num_members_other" = "%@ users";
|
||||
"invite" = "Invite";
|
||||
"kick" = "Kick";
|
||||
"kick" = "Remove from chat";
|
||||
"ban" = "Ban";
|
||||
"unban" = "Un-ban";
|
||||
"message_unsaved_changes" = "There are unsaved changes. Leaving will discard them.";
|
||||
|
||||
@@ -1422,29 +1422,31 @@ static const CGFloat kLocalPreviewMargin = 20;
|
||||
}
|
||||
}
|
||||
|
||||
- (void)updateProximityAndSleep
|
||||
{
|
||||
BOOL inCall = (mxCall.state == MXCallStateConnected || mxCall.state == MXCallStateRinging || mxCall.state == MXCallStateInviteSent || mxCall.state == MXCallStateConnecting || mxCall.state == MXCallStateCreateOffer || mxCall.state == MXCallStateCreateAnswer);
|
||||
|
||||
if (inCall)
|
||||
{
|
||||
BOOL isBuiltInReceiverUsed = self.isBuiltInReceiverAudioOuput;
|
||||
|
||||
// Enable the proximity monitoring when the built in receiver is used as the audio output.
|
||||
BOOL enableProxMonitoring = isBuiltInReceiverUsed;
|
||||
[[UIDevice currentDevice] setProximityMonitoringEnabled:enableProxMonitoring];
|
||||
|
||||
// Disable the idle timer during a video call, or during a voice call which is performed with the built-in receiver.
|
||||
// Note: if the device is locked, VoIP calling get dropped if an incoming GSM call is received.
|
||||
BOOL disableIdleTimer = mxCall.isVideoCall || isBuiltInReceiverUsed;
|
||||
|
||||
UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)];
|
||||
if (sharedApplication)
|
||||
{
|
||||
sharedApplication.idleTimerDisabled = disableIdleTimer;
|
||||
}
|
||||
}
|
||||
}
|
||||
- (void)updateProximityAndSleep
|
||||
{
|
||||
BOOL inCall = (mxCall.state == MXCallStateConnected || mxCall.state == MXCallStateRinging || mxCall.state == MXCallStateInviteSent || mxCall.state == MXCallStateConnecting || mxCall.state == MXCallStateCreateOffer || mxCall.state == MXCallStateCreateAnswer);
|
||||
|
||||
BOOL isBuiltInReceiverUsed = self.isBuiltInReceiverAudioOuput;
|
||||
|
||||
// Enable the proximity monitoring when the built in receiver is used as the audio output.
|
||||
BOOL enableProxMonitoring = inCall && isBuiltInReceiverUsed;
|
||||
|
||||
UIDevice *device = [UIDevice currentDevice];
|
||||
if (device && device.isProximityMonitoringEnabled != enableProxMonitoring)
|
||||
{
|
||||
[device setProximityMonitoringEnabled:enableProxMonitoring];
|
||||
}
|
||||
|
||||
// Disable the idle timer during a video call, or during a voice call which is performed with the built-in receiver.
|
||||
// Note: if the device is locked, VoIP calling get dropped if an incoming GSM call is received.
|
||||
BOOL disableIdleTimer = inCall && (mxCall.isVideoCall || isBuiltInReceiverUsed);
|
||||
|
||||
UIApplication *sharedApplication = [UIApplication performSelector:@selector(sharedApplication)];
|
||||
if (sharedApplication && sharedApplication.isIdleTimerDisabled != disableIdleTimer)
|
||||
{
|
||||
sharedApplication.idleTimerDisabled = disableIdleTimer;
|
||||
}
|
||||
}
|
||||
|
||||
- (UIView *)createIncomingCallView
|
||||
{
|
||||
|
||||
@@ -1873,6 +1873,10 @@ static NSString *contactsBookInfoFile = @"contactsV2";
|
||||
if (error == nil)
|
||||
{
|
||||
[cipher writeToFile:[self dataFilePathForComponent:fileName] atomically:YES];
|
||||
[[NSFileManager defaultManager] excludeItemFromBackupAt:[NSURL fileURLWithPath:fileName] error:&error];
|
||||
if (error) {
|
||||
MXLogDebug(@"[MXKContactManager] Cannot exclude item from backup %@", error.localizedDescription);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#import "MXKAppSettings.h"
|
||||
|
||||
#import "MXKTools.h"
|
||||
@import MatrixSDK;
|
||||
|
||||
|
||||
// get ISO country name
|
||||
@@ -66,11 +67,10 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
{
|
||||
NSString *cacheFolder;
|
||||
|
||||
// Check for a potential application group id
|
||||
NSString *applicationGroupIdentifier = [MXSDKOptions sharedInstance].applicationGroupIdentifier;
|
||||
if (applicationGroupIdentifier)
|
||||
// Check for a potential application group container
|
||||
NSURL *sharedContainerURL = [[NSFileManager defaultManager] applicationGroupContainerURL];
|
||||
if (sharedContainerURL)
|
||||
{
|
||||
NSURL *sharedContainerURL = [[NSFileManager defaultManager] containerURLForSecurityApplicationGroupIdentifier:applicationGroupIdentifier];
|
||||
cacheFolder = [sharedContainerURL path];
|
||||
}
|
||||
else
|
||||
@@ -86,7 +86,7 @@ static NSString *const kMXAppGroupID = @"group.org.matrix";
|
||||
if (cacheFolder && ![[NSFileManager defaultManager] fileExistsAtPath:cacheFolder])
|
||||
{
|
||||
NSError *error;
|
||||
[[NSFileManager defaultManager] createDirectoryAtPath:cacheFolder withIntermediateDirectories:YES attributes:nil error:&error];
|
||||
[[NSFileManager defaultManager] createDirectoryExcludedFromBackupAtPath:cacheFolder error:&error];
|
||||
if (error)
|
||||
{
|
||||
MXLogDebug(@"[MXKAppSettings] cacheFolder: Error: Cannot create MatrixKit folder at %@. Error: %@", cacheFolder, error);
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#import "MXKEventFormatter.h"
|
||||
#import "MXKURLPreviewDataProtocol.h"
|
||||
|
||||
@class MXThread;
|
||||
@protocol MXThreadProtocol;
|
||||
|
||||
/**
|
||||
Flags to indicate if a fix is required at the display time.
|
||||
@@ -108,7 +108,7 @@ typedef enum : NSUInteger {
|
||||
/**
|
||||
Thread for the bubble component. Should only exist for thread root events.
|
||||
*/
|
||||
@property (nonatomic, readonly) MXThread *thread;
|
||||
@property (nonatomic, readonly) id<MXThreadProtocol> thread;
|
||||
|
||||
/**
|
||||
Create a new `MXKRoomBubbleComponent` object based on a `MXEvent` instance.
|
||||
|
||||
@@ -22,7 +22,7 @@
|
||||
|
||||
@interface MXKRoomBubbleComponent ()
|
||||
|
||||
@property (nonatomic, readwrite) MXThread *thread;
|
||||
@property (nonatomic, readwrite) id<MXThreadProtocol> thread;
|
||||
|
||||
@end
|
||||
|
||||
@@ -69,8 +69,17 @@
|
||||
_showEncryptionBadge = [self shouldShowWarningBadgeForEvent:event roomState:(MXRoomState*)roomState session:session];
|
||||
|
||||
[self updateLinkWithRoomState:roomState];
|
||||
|
||||
self.thread = [session.threadingService threadWithId:event.eventId];
|
||||
|
||||
if (event.unsignedData.relations.thread)
|
||||
{
|
||||
self.thread = [[MXThreadModel alloc] initWithRootEvent:event
|
||||
notificationCount:0
|
||||
highlightCount:0];
|
||||
}
|
||||
else
|
||||
{
|
||||
self.thread = [session.threadingService threadWithId:event.eventId];
|
||||
}
|
||||
}
|
||||
return self;
|
||||
}
|
||||
|
||||
@@ -955,7 +955,7 @@ static NSString *const kHTMLATagRegexPattern = @"<a href=\"(.*?)\">([^<]*)</a>";
|
||||
}
|
||||
if (event.content[@"kick"])
|
||||
{
|
||||
displayText = [NSString stringWithFormat:@"%@\n\u2022 kick: %@", displayText, event.content[@"kick"]];
|
||||
displayText = [NSString stringWithFormat:@"%@\n\u2022 remove: %@", displayText, event.content[@"kick"]];
|
||||
}
|
||||
if (event.content[@"redact"])
|
||||
{
|
||||
|
||||
@@ -102,7 +102,7 @@ var onloadCallback = function() { \
|
||||
if ([urlString hasPrefix:@"js:"])
|
||||
{
|
||||
// Listen only to scheme of the JS-WKWebView bridge
|
||||
NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject] stringByAddingPercentEncodingWithAllowedCharacters:[NSCharacterSet URLQueryAllowedCharacterSet]];
|
||||
NSString *jsonString = [[[urlString componentsSeparatedByString:@"js:"] lastObject] stringByRemovingPercentEncoding];
|
||||
NSData *jsonData = [jsonString dataUsingEncoding:NSUTF8StringEncoding];
|
||||
|
||||
NSError *error;
|
||||
|
||||
Reference in New Issue
Block a user