MESSENGER-4032 disable thread options

This commit is contained in:
JanNiklas Grabowski
2023-01-11 13:26:13 +00:00
committed by Frank Rotermund
parent 9ed2133acd
commit 4b6aac50ab
+17 -7
View File
@@ -686,8 +686,9 @@ static CGSize kThreadListBarButtonItemImageSize;
}
self.showSettingsInitially = NO;
if (!RiotSettings.shared.threadsNoticeDisplayed && RiotSettings.shared.enableThreads && BWIBuildSettings.shared.bwiShowThreads)
// bwi: check if threads are enabled and show thread notice once if enabled
if (!RiotSettings.shared.threadsNoticeDisplayed && self.showThreadOption)
{
[self showThreadsNotice];
}
@@ -1674,8 +1675,8 @@ static CGSize kThreadListBarButtonItemImageSize;
button.contentEdgeInsets = UIEdgeInsetsMake(4, 12, 4, 12);
UIBarButtonItem *item;
if (RiotSettings.shared.enableThreads)
// bwi: check if threads are enabled
if (self.showThreadOption)
{
// Add some spacing when there is a threads button
UIView *buttonContainer = [[UIView alloc] initWithFrame:CGRectZero];
@@ -1965,7 +1966,8 @@ static CGSize kThreadListBarButtonItemImageSize;
[self refreshMissedDiscussionsCount:YES];
if (RiotSettings.shared.enableThreads)
// bwi: check if threads are enabled
if (self.showThreadOption)
{
if (self.roomDataSource.threadId)
{
@@ -7296,8 +7298,9 @@ static CGSize kThreadListBarButtonItemImageSize;
MXStrongifyAndReturnIfNil(self);
[self hideContextualMenuAnimated:YES cancelEventSelection:NO completion:nil];
if (RiotSettings.shared.enableThreads)
// bwi: check if threads are enabled
if (self.showThreadOption)
{
[self openThreadWithId:event.eventId];
}
@@ -7326,6 +7329,13 @@ static CGSize kThreadListBarButtonItemImageSize;
#pragma mark - Threads
// bwi: check if threads are enabled
- (BOOL)showThreadOption
{
return (RiotSettings.shared.enableThreads || self.mainSession.store.supportedMatrixVersions.supportsThreads)
&& BWIBuildSettings.shared.bwiShowThreads;
}
- (BOOL)showThreadOptionForEvent:(MXEvent*)event
{
return !self.roomDataSource.threadId