mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-20 08:32:53 +02:00
Merge pull request #5865 from vector-im/ismail/5770_threads_notice
Threads notice
This commit is contained in:
@@ -210,6 +210,7 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
@property (nonatomic, strong) CustomSizedPresentationController *customSizedPresentationController;
|
||||
@property (nonatomic, strong) RoomParticipantsInviteCoordinatorBridgePresenter *participantsInvitePresenter;
|
||||
@property (nonatomic, strong) ThreadsCoordinatorBridgePresenter *threadsBridgePresenter;
|
||||
@property (nonatomic, strong) SlidingModalPresenter *threadsNoticeModalPresenter;
|
||||
@property (nonatomic, getter=isActivitiesViewExpanded) BOOL activitiesViewExpanded;
|
||||
@property (nonatomic, getter=isScrollToBottomHidden) BOOL scrollToBottomHidden;
|
||||
@property (nonatomic, getter=isMissedDiscussionsBadgeHidden) BOOL missedDiscussionsBadgeHidden;
|
||||
@@ -658,6 +659,11 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
}
|
||||
|
||||
self.showSettingsInitially = NO;
|
||||
|
||||
if (!RiotSettings.shared.threadsNoticeDisplayed && RiotSettings.shared.enableThreads)
|
||||
{
|
||||
[self showThreadsNotice];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)viewDidDisappear:(BOOL)animated
|
||||
@@ -6778,6 +6784,35 @@ static CGSize kThreadListBarButtonItemImageSize;
|
||||
|
||||
#pragma mark - Threads
|
||||
|
||||
- (void)showThreadsNotice
|
||||
{
|
||||
if (!self.threadsNoticeModalPresenter)
|
||||
{
|
||||
self.threadsNoticeModalPresenter = [SlidingModalPresenter new];
|
||||
}
|
||||
|
||||
[self.threadsNoticeModalPresenter dismissWithAnimated:NO completion:nil];
|
||||
|
||||
ThreadsNoticeViewController *threadsNoticeVC = [ThreadsNoticeViewController instantiate];
|
||||
|
||||
MXWeakify(self);
|
||||
|
||||
threadsNoticeVC.didTapDoneButton = ^{
|
||||
|
||||
MXStrongifyAndReturnIfNil(self);
|
||||
|
||||
[self.threadsNoticeModalPresenter dismissWithAnimated:YES completion:^{
|
||||
RiotSettings.shared.threadsNoticeDisplayed = YES;
|
||||
}];
|
||||
};
|
||||
|
||||
[self.threadsNoticeModalPresenter present:threadsNoticeVC
|
||||
from:self.presentedViewController?:self
|
||||
animated:YES
|
||||
options:SlidingModalPresenter.SpanningOption
|
||||
completion:nil];
|
||||
}
|
||||
|
||||
- (void)openThreadWithId:(NSString *)threadId
|
||||
{
|
||||
if (self.threadsBridgePresenter)
|
||||
|
||||
Reference in New Issue
Block a user