mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-11-27 23:09:35 +01:00
Merge branch 'krille/apl' into 'main'
fix: Minor apl bugs See merge request famedly/fluffychat!339
This commit is contained in:
commit
e09782f0a4
@ -114,8 +114,10 @@ class _ChatSettingsPopupMenuState extends State<ChatSettingsPopupMenu> {
|
||||
startCallAction(context);
|
||||
break;
|
||||
case 'details':
|
||||
await AdaptivePageLayout.of(context).pushNamedAndRemoveAllOthers(
|
||||
'/rooms/${widget.room.id}/details');
|
||||
if (AdaptivePageLayout.of(context).viewDataStack.length < 3) {
|
||||
await AdaptivePageLayout.of(context)
|
||||
.pushNamed('/rooms/${widget.room.id}/details');
|
||||
}
|
||||
|
||||
break;
|
||||
}
|
||||
|
@ -82,7 +82,7 @@ class FluffyRoutes {
|
||||
case 'rooms':
|
||||
if (parts.length == 3) {
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
);
|
||||
} else if (parts.length == 4) {
|
||||
@ -91,31 +91,31 @@ class FluffyRoutes {
|
||||
switch (action) {
|
||||
case 'details':
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
rightView: (_) => ChatDetails(roomId),
|
||||
);
|
||||
case 'encryption':
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
rightView: (_) => ChatEncryptionSettings(roomId),
|
||||
);
|
||||
case 'permissions':
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
rightView: (_) => ChatPermissionsSettings(roomId),
|
||||
);
|
||||
case 'invite':
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
rightView: (_) => InvitationSelection(roomId),
|
||||
);
|
||||
case 'emotes':
|
||||
return ViewData(
|
||||
leftView: (_) => ChatList(),
|
||||
leftView: (_) => ChatList(activeChat: parts[2]),
|
||||
mainView: (_) => Chat(parts[2]),
|
||||
rightView: (_) => MultipleEmotesSettings(roomId),
|
||||
);
|
||||
|
@ -36,6 +36,7 @@ class _ArchiveState extends State<Archive> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).archive),
|
||||
elevation: _scrolledToTop ? 0 : null,
|
||||
),
|
||||
|
@ -472,7 +472,8 @@ class _ChatState extends State<Chat> {
|
||||
onPressed: () => setState(() => selectedEvents.clear()),
|
||||
)
|
||||
: null,
|
||||
titleSpacing: 0,
|
||||
titleSpacing:
|
||||
AdaptivePageLayout.of(context).columnMode(context) ? null : 0,
|
||||
title: selectedEvents.isEmpty
|
||||
? StreamBuilder<Object>(
|
||||
stream: room.onUpdate.stream,
|
||||
@ -490,7 +491,12 @@ class _ChatState extends State<Chat> {
|
||||
),
|
||||
)
|
||||
: () => AdaptivePageLayout.of(context)
|
||||
.pushNamed('/rooms/${room.id}/details'),
|
||||
.viewDataStack
|
||||
.length <
|
||||
3
|
||||
? AdaptivePageLayout.of(context)
|
||||
.pushNamed('/rooms/${room.id}/details')
|
||||
: null,
|
||||
title: Text(
|
||||
room.getLocalizedDisplayname(
|
||||
MatrixLocals(L10n.of(context))),
|
||||
|
@ -172,6 +172,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||
if (room == null) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).oopsSomethingWentWrong),
|
||||
),
|
||||
body: Center(
|
||||
@ -192,6 +193,7 @@ class _ChatDetailsState extends State<ChatDetails> {
|
||||
headerSliverBuilder:
|
||||
(BuildContext context, bool innerBoxIsScrolled) => <Widget>[
|
||||
SliverAppBar(
|
||||
leading: BackButton(),
|
||||
expandedHeight: 300.0,
|
||||
floating: true,
|
||||
pinned: true,
|
||||
|
@ -91,6 +91,7 @@ class _ChatEncryptionSettingsState extends State<ChatEncryptionSettings> {
|
||||
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).participatingUserDevices),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
|
@ -45,7 +45,10 @@ class ChatPermissionsSettings extends StatelessWidget {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10n.of(context).editChatPermissions)),
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).editChatPermissions),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
stream: Matrix.of(context).client.onSync.stream.where(
|
||||
(e) =>
|
||||
|
@ -122,6 +122,7 @@ class _DiscoverPageState extends State<DiscoverPage> {
|
||||
);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
titleSpacing: 0,
|
||||
elevation: _scrolledToTop ? 0 : null,
|
||||
title: DefaultAppBarSearchField(
|
||||
|
@ -123,6 +123,7 @@ class _InvitationSelectionState extends State<InvitationSelection> {
|
||||
room.name?.isEmpty ?? false ? L10n.of(context).group : room.name;
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
titleSpacing: 0,
|
||||
title: DefaultAppBarSearchField(
|
||||
autofocus: true,
|
||||
|
@ -156,7 +156,7 @@ class _LoginState extends State<Login> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: loading ? Container() : null,
|
||||
leading: loading ? Container() : BackButton(),
|
||||
elevation: 0,
|
||||
title: Text(
|
||||
L10n.of(context).logInTo(Matrix.of(context)
|
||||
|
@ -40,6 +40,7 @@ class _NewGroupState extends State<NewGroup> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).createNewGroup),
|
||||
elevation: 0,
|
||||
),
|
||||
|
@ -85,6 +85,7 @@ class _NewPrivateChatState extends State<NewPrivateChat> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).newPrivateChat),
|
||||
elevation: 0,
|
||||
),
|
||||
|
@ -260,6 +260,7 @@ class _SettingsState extends State<Settings> {
|
||||
if (mounted) setState(() => profile = p);
|
||||
return p;
|
||||
});
|
||||
if (client.encryption != null) {
|
||||
crossSigningCachedFuture ??=
|
||||
client.encryption.crossSigning.isCached().then((c) {
|
||||
if (mounted) setState(() => crossSigningCached = c);
|
||||
@ -270,11 +271,13 @@ class _SettingsState extends State<Settings> {
|
||||
if (mounted) setState(() => megolmBackupCached = c);
|
||||
return c;
|
||||
});
|
||||
}
|
||||
return Scaffold(
|
||||
body: NestedScrollView(
|
||||
headerSliverBuilder: (BuildContext context, bool innerBoxIsScrolled) =>
|
||||
<Widget>[
|
||||
SliverAppBar(
|
||||
leading: BackButton(),
|
||||
expandedHeight: 300.0,
|
||||
floating: true,
|
||||
pinned: true,
|
||||
@ -434,6 +437,7 @@ class _SettingsState extends State<Settings> {
|
||||
),
|
||||
onTap: () => _deleteAccountAction(context),
|
||||
),
|
||||
if (client.encryption != null) ...{
|
||||
Divider(thickness: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
@ -554,6 +558,7 @@ class _SettingsState extends State<Settings> {
|
||||
),
|
||||
trailing: Icon(Icons.vpn_key_outlined),
|
||||
),
|
||||
},
|
||||
Divider(thickness: 1),
|
||||
ListTile(
|
||||
title: Text(
|
||||
|
@ -95,6 +95,7 @@ class _Settings3PidState extends State<Settings3Pid> {
|
||||
_request ??= Matrix.of(context).client.requestThirdPartyIdentifiers();
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).passwordRecovery),
|
||||
actions: [
|
||||
IconButton(
|
||||
|
@ -88,7 +88,10 @@ class DevicesSettingsState extends State<DevicesSettings> {
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10n.of(context).devices)),
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).devices),
|
||||
),
|
||||
body: FutureBuilder<bool>(
|
||||
future: _loadUserDevices(context),
|
||||
builder: (BuildContext context, snapshot) {
|
||||
|
@ -169,6 +169,7 @@ class _EmotesSettingsState extends State<EmotesSettings> {
|
||||
}
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).emoteSettings),
|
||||
),
|
||||
floatingActionButton: showSave
|
||||
|
@ -22,7 +22,10 @@ class SettingsIgnoreList extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
final client = Matrix.of(context).client;
|
||||
return Scaffold(
|
||||
appBar: AppBar(title: Text(L10n.of(context).ignoredUsers)),
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).ignoredUsers),
|
||||
),
|
||||
body: Column(
|
||||
children: [
|
||||
Padding(
|
||||
|
@ -14,6 +14,7 @@ class MultipleEmotesSettings extends StatelessWidget {
|
||||
final room = Matrix.of(context).client.getRoomById(roomId);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).emotePacks),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
|
@ -109,6 +109,7 @@ class SettingsNotifications extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).notifications),
|
||||
),
|
||||
body: StreamBuilder(
|
||||
|
@ -51,6 +51,7 @@ class _SettingsStyleState extends State<SettingsStyle> {
|
||||
Widget build(BuildContext context) {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
title: Text(L10n.of(context).changeTheme),
|
||||
),
|
||||
body: ListView(
|
||||
|
@ -70,7 +70,7 @@ class _SignUpState extends State<SignUp> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
leading: loading ? Container() : null,
|
||||
leading: loading ? Container() : BackButton(),
|
||||
title: Text(
|
||||
Matrix.of(context)
|
||||
.client
|
||||
|
@ -110,7 +110,7 @@ class _SignUpPasswordState extends State<SignUpPassword> {
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
elevation: 0,
|
||||
leading: loading ? Container() : null,
|
||||
leading: loading ? Container() : BackButton(),
|
||||
title: Text(
|
||||
L10n.of(context).chooseAStrongPassword,
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user