mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-21 00:52:43 +02:00
BF: Edits: editing an unsent msg gets cancelled if the original msg send completes during the edit
#2495
This commit is contained in:
@@ -287,6 +287,7 @@
|
||||
|
||||
// Listen to the event sent state changes
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventDidChangeSentState:) name:kMXEventDidChangeSentStateNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(eventDidChangeIdentifier:) name:kMXEventDidChangeIdentifierNotification object:nil];
|
||||
}
|
||||
|
||||
- (void)viewDidLoad
|
||||
@@ -1221,6 +1222,7 @@
|
||||
missedDiscussionsBadgeLabel = nil;
|
||||
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXEventDidChangeSentStateNotification object:nil];
|
||||
[[NSNotificationCenter defaultCenter] removeObserver:self name:kMXEventDidChangeIdentifierNotification object:nil];
|
||||
|
||||
[super destroy];
|
||||
}
|
||||
@@ -4564,6 +4566,18 @@
|
||||
}
|
||||
}
|
||||
|
||||
- (void)eventDidChangeIdentifier:(NSNotification *)notif
|
||||
{
|
||||
MXEvent *event = notif.object;
|
||||
NSString *previousId = notif.userInfo[kMXEventIdentifierKey];
|
||||
|
||||
if ([customizedRoomDataSource.selectedEventId isEqualToString:previousId])
|
||||
{
|
||||
NSLog(@"[RoomVC] eventDidChangeIdentifier: Update selectedEventId");
|
||||
customizedRoomDataSource.selectedEventId = event.eventId;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
- (void)resendAllUnsentMessages
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user