mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-24 02:22:44 +02:00
Implement opening thread modal when tapped
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
/**
|
||||
The event id of the current selected event if any. Default is nil.
|
||||
*/
|
||||
@property(nonatomic) NSString *selectedEventId;
|
||||
@property(nonatomic, nullable) NSString *selectedEventId;
|
||||
|
||||
/**
|
||||
Tell whether the initial event of the timeline (if any) must be marked. Default is NO.
|
||||
@@ -60,7 +60,7 @@
|
||||
|
||||
@return a widget representating the active jitsi conference in the room. Else, nil.
|
||||
*/
|
||||
- (Widget *)jitsiWidget;
|
||||
- (Widget * _Nullable)jitsiWidget;
|
||||
|
||||
/**
|
||||
Send a video to the room.
|
||||
@@ -74,9 +74,9 @@
|
||||
the event id of the event generated on the homeserver
|
||||
@param failure A block object called when the operation fails.
|
||||
*/
|
||||
- (void)sendVideo:(NSURL*)videoLocalURL
|
||||
success:(void (^)(NSString *eventId))success
|
||||
failure:(void (^)(NSError *error))failure;
|
||||
- (void)sendVideo:(NSURL * _Nonnull)videoLocalURL
|
||||
success:(nullable void (^)(NSString * _Nonnull))success
|
||||
failure:(nullable void (^)(NSError * _Nullable))failure;
|
||||
|
||||
/**
|
||||
Accept incoming key verification request.
|
||||
@@ -85,9 +85,9 @@
|
||||
@param success A block object called when the operation succeeds.
|
||||
@param failure A block object called when the operation fails.
|
||||
*/
|
||||
- (void)acceptVerificationRequestForEventId:(NSString*)eventId
|
||||
success:(void(^)(void))success
|
||||
failure:(void(^)(NSError*))failure;
|
||||
- (void)acceptVerificationRequestForEventId:(NSString * _Nonnull)eventId
|
||||
success:(nullable void(^)(void))success
|
||||
failure:(nullable void(^)(NSError * _Nullable))failure;
|
||||
|
||||
/**
|
||||
Decline incoming key verification request.
|
||||
@@ -96,9 +96,9 @@
|
||||
@param success A block object called when the operation succeeds.
|
||||
@param failure A block object called when the operation fails.
|
||||
*/
|
||||
- (void)declineVerificationRequestForEventId:(NSString*)eventId
|
||||
success:(void(^)(void))success
|
||||
failure:(void(^)(NSError*))failure;
|
||||
- (void)declineVerificationRequestForEventId:(NSString * _Nonnull)eventId
|
||||
success:(nullable void(^)(void))success
|
||||
failure:(nullable void(^)(NSError * _Nullable))failure;
|
||||
|
||||
- (void)resetTypingNotification;
|
||||
|
||||
@@ -106,9 +106,19 @@
|
||||
|
||||
@protocol RoomDataSourceDelegate <MXKDataSourceDelegate>
|
||||
|
||||
- (void)roomDataSource:(RoomDataSource*)roomDataSource didUpdateEncryptionTrustLevel:(RoomEncryptionTrustLevel)roomEncryptionTrustLevel;
|
||||
|
||||
- (void)roomDataSource:(RoomDataSource*)roomDataSource didCancel:(MXEvent *)event;
|
||||
/**
|
||||
Called when the room's encryption trust level did updated.
|
||||
|
||||
@param roomDataSource room data source instance
|
||||
*/
|
||||
- (void)roomDataSourceDidUpdateEncryptionTrustLevel:(RoomDataSource * _Nonnull)roomDataSource;
|
||||
|
||||
/**
|
||||
Called when a thread summary view
|
||||
|
||||
@param roomDataSource room data source instance
|
||||
*/
|
||||
- (void)roomDataSource:(RoomDataSource * _Nonnull)roomDataSource
|
||||
didTapThread:(MXThread * _Nonnull)thread;
|
||||
|
||||
@end
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
const CGFloat kTypingCellHeight = 24;
|
||||
|
||||
@interface RoomDataSource() <BubbleReactionsViewModelDelegate, URLPreviewViewDelegate>
|
||||
@interface RoomDataSource() <BubbleReactionsViewModelDelegate, URLPreviewViewDelegate, ThreadSummaryViewDelegate>
|
||||
{
|
||||
// Observe kThemeServiceDidChangeThemeNotification to handle user interface theme change.
|
||||
id kThemeServiceDidChangeThemeNotificationObserver;
|
||||
@@ -231,7 +231,7 @@ const CGFloat kTypingCellHeight = 24;
|
||||
- (void)fetchEncryptionTrustedLevel
|
||||
{
|
||||
self.encryptionTrustLevel = self.room.summary.roomEncryptionTrustLevel;
|
||||
[self.roomDataSourceDelegate roomDataSource:self didUpdateEncryptionTrustLevel:self.encryptionTrustLevel];
|
||||
[self.roomDataSourceDelegate roomDataSourceDidUpdateEncryptionTrustLevel:self];
|
||||
}
|
||||
|
||||
- (void)roomDidSet
|
||||
@@ -510,6 +510,7 @@ const CGFloat kTypingCellHeight = 24;
|
||||
if (RiotSettings.shared.enableThreads && component.thread && !self.threadId)
|
||||
{
|
||||
threadSummaryView = [ThreadSummaryView instantiateWithThread:component.thread];
|
||||
threadSummaryView.delegate = self;
|
||||
|
||||
[temporaryViews addObject:threadSummaryView];
|
||||
[bubbleCell.tmpSubviews addObject:threadSummaryView];
|
||||
@@ -1013,9 +1014,9 @@ const CGFloat kTypingCellHeight = 24;
|
||||
return jitsiWidget;
|
||||
}
|
||||
|
||||
- (void)sendVideo:(NSURL*)videoLocalURL
|
||||
success:(void (^)(NSString *eventId))success
|
||||
failure:(void (^)(NSError *error))failure
|
||||
- (void)sendVideo:(NSURL *)videoLocalURL
|
||||
success:(void (^)(NSString * _Nonnull))success
|
||||
failure:(void (^)(NSError * _Nullable))failure
|
||||
{
|
||||
AVURLAsset *videoAsset = [AVURLAsset assetWithURL:videoLocalURL];
|
||||
UIImage *videoThumbnail = [MXKVideoThumbnailGenerator.shared generateThumbnailFrom:videoLocalURL];
|
||||
@@ -1333,4 +1334,12 @@ const CGFloat kTypingCellHeight = 24;
|
||||
[self refreshCells];
|
||||
}
|
||||
|
||||
#pragma mark - ThreadSummaryViewDelegate
|
||||
|
||||
- (void)threadSummaryViewTapped:(ThreadSummaryView *)summaryView
|
||||
{
|
||||
[self.roomDataSourceDelegate roomDataSource:self
|
||||
didTapThread:summaryView.thread];
|
||||
}
|
||||
|
||||
@end
|
||||
|
||||
Reference in New Issue
Block a user