mirror of
https://gitlab.opencode.de/bwi/bundesmessenger/clients/bundesmessenger-ios.git
synced 2026-04-26 11:30:50 +02:00
MESSENGER-4032 disable thread options
This commit is contained in:
committed by
Frank Rotermund
parent
9ed2133acd
commit
4b6aac50ab
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user