alterações em telas
This commit is contained in:
@@ -8,7 +8,6 @@ import 'dart:async';
|
||||
import 'package:collection/collection.dart';
|
||||
import 'package:cross_file/cross_file.dart';
|
||||
import 'package:tatchat/config/app_config.dart';
|
||||
import 'package:tatchat/config/themes.dart';
|
||||
import 'package:tatchat/l10n/l10n.dart';
|
||||
import 'package:tatchat/pages/chat_list/chat_list_view.dart';
|
||||
import 'package:tatchat/pages/chat_list/tabs/home_tab.dart';
|
||||
@@ -101,13 +100,10 @@ class ChatListController extends State<ChatList>
|
||||
Future<void> setActiveSpace(String spaceId) async {
|
||||
await Matrix.of(context).client.getRoomById(spaceId)!.postLoad();
|
||||
if (!mounted) return;
|
||||
if (!FluffyThemes.isColumnMode(context) &&
|
||||
!AppSettings.displayNavigationRail.value) {
|
||||
await AppSettings.displayNavigationRail.setItem(true);
|
||||
}
|
||||
|
||||
setState(() {
|
||||
_activeSpaceId = spaceId;
|
||||
homeTab = HomeTab.spaces;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -304,14 +300,6 @@ class ChatListController extends State<ChatList>
|
||||
}
|
||||
}
|
||||
|
||||
void openNavrail() {
|
||||
setState(() {
|
||||
AppSettings.displayNavigationRail.setItem(
|
||||
!AppSettings.displayNavigationRail.value,
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
void startSearch() {
|
||||
setState(() {
|
||||
isSearchMode = true;
|
||||
@@ -355,10 +343,6 @@ class ChatListController extends State<ChatList>
|
||||
context.push('/rooms/$spaceId/details');
|
||||
}
|
||||
|
||||
// Needs to match GroupsSpacesEntry for 'separate group' checking.
|
||||
List<Room> get spaces =>
|
||||
Matrix.of(context).client.rooms.where((r) => r.isSpace).toList();
|
||||
|
||||
String? get activeChat => widget.activeChat;
|
||||
|
||||
void _processIncomingSharedMedia(List<SharedMediaFile> files) {
|
||||
@@ -423,6 +407,7 @@ class ChatListController extends State<ChatList>
|
||||
void initState() {
|
||||
_initReceiveSharingIntent();
|
||||
_activeSpaceId = widget.activeSpace;
|
||||
if (widget.activeSpace != null) homeTab = HomeTab.spaces;
|
||||
|
||||
scrollController.addListener(_onScroll);
|
||||
_waitForFirstSync();
|
||||
@@ -984,6 +969,7 @@ class ChatListController extends State<ChatList>
|
||||
setState(() {
|
||||
activeFilter = ActiveFilter.allChats;
|
||||
_activeSpaceId = null;
|
||||
homeTab = HomeTab.chats;
|
||||
Matrix.of(context).setActiveClient(client);
|
||||
});
|
||||
_clientStream.add(client);
|
||||
@@ -993,6 +979,7 @@ class ChatListController extends State<ChatList>
|
||||
context.go('/rooms');
|
||||
setState(() {
|
||||
_activeSpaceId = null;
|
||||
homeTab = HomeTab.chats;
|
||||
Matrix.of(context).activeBundle = bundle;
|
||||
if (!Matrix.of(
|
||||
context,
|
||||
|
||||
Reference in New Issue
Block a user