Delight edit layout experiment (#6384)

* Delight: Edit layout experiment #6079
* Feature flag new App Layout #6406
* Update All chats screen with latest design #6407
This commit is contained in:
Gil Eluard
2022-08-02 17:27:33 +02:00
committed by GitHub
parent 10a9d1d37f
commit 0aa5b4f4a1
58 changed files with 2084 additions and 165 deletions
+26 -13
View File
@@ -112,7 +112,7 @@
[self vc_removeBackTitle];
[self setupTitleView];
self.titleLabelText = [VectorL10n titleHome];
titleView.titleLabel.text = [VectorL10n allChatsTitle];
childViewControllers = [NSMutableArray array];
@@ -163,6 +163,8 @@
}];
[self userInterfaceThemeDidChange];
}
self.tabBar.hidden = BuildSettings.newAppLayoutEnabled;
}
- (void)viewDidAppear:(BOOL)animated
@@ -329,7 +331,7 @@
// Restore the right delegate of the shared recent data source.
id<MXKDataSourceDelegate> recentsDataSourceDelegate = self.homeViewController;
RecentsDataSourceMode recentsDataSourceMode = RecentsDataSourceModeHome;
RecentsDataSourceMode recentsDataSourceMode = self.homeViewController.recentsDataSourceMode;
NSInteger tabItemTag = self.tabBar.items[self.selectedIndex].tag;
@@ -647,20 +649,26 @@
{
if (roomParentId) {
NSString *parentName = [mxSession roomSummaryWithRoomId:roomParentId].displayname;
NSMutableArray<NSString *> *breadcrumbs = [[NSMutableArray alloc] initWithObjects:parentName, nil];
MXSpace *firstRootAncestor = roomParentId ? [mxSession.spaceService firstRootAncestorForRoomWithId:roomParentId] : nil;
NSString *rootName = nil;
if (firstRootAncestor)
if (!BuildSettings.newAppLayoutEnabled)
{
rootName = [mxSession roomSummaryWithRoomId:firstRootAncestor.spaceId].displayname;
[breadcrumbs insertObject:rootName atIndex:0];
NSMutableArray<NSString *> *breadcrumbs = [[NSMutableArray alloc] initWithObjects:parentName, nil];
MXSpace *firstRootAncestor = roomParentId ? [mxSession.spaceService firstRootAncestorForRoomWithId:roomParentId] : nil;
NSString *rootName = nil;
if (firstRootAncestor)
{
rootName = [mxSession roomSummaryWithRoomId:firstRootAncestor.spaceId].displayname;
[breadcrumbs insertObject:rootName atIndex:0];
}
titleView.breadcrumbView.breadcrumbs = breadcrumbs;
}
titleView.breadcrumbView.breadcrumbs = breadcrumbs;
}
else
{
titleView.breadcrumbView.breadcrumbs = @[];
if (!BuildSettings.newAppLayoutEnabled)
{
titleView.breadcrumbView.breadcrumbs = @[];
}
}
recentsDataSource.currentSpace = [mxSession.spaceService getSpaceWithId:roomParentId];
@@ -669,6 +677,8 @@
- (void)updateSideMenuNotifcationIcon
{
if (BuildSettings.newAppLayoutEnabled) { return; }
BOOL displayNotification = NO;
for (MXRoomSummary *summary in recentsDataSource.mxSession.spaceService.rootSpaceSummaries) {
@@ -699,8 +709,11 @@
-(void)setupTitleView
{
titleView = [MainTitleView new];
self.navigationItem.titleView = titleView;
if (!BuildSettings.newAppLayoutEnabled)
{
titleView = [MainTitleView new];
self.navigationItem.titleView = titleView;
}
}
-(void)setTitleLabelText:(NSString *)text