From d4ab6585ea608580cc26d9c0739aeec7b28b2e80 Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 8 Jul 2021 13:28:30 -0700 Subject: [PATCH 1/2] UI state fixes Fix #89 Fix #75 --- lib/views/groupsettingsview.dart | 1 + lib/views/peersettingsview.dart | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/views/groupsettingsview.dart b/lib/views/groupsettingsview.dart index f1e50b95..a0149122 100644 --- a/lib/views/groupsettingsview.dart +++ b/lib/views/groupsettingsview.dart @@ -173,6 +173,7 @@ class _GroupSettingsViewState extends State { var handle = Provider.of(context, listen: false).onion; Provider.of(context, listen: false).cwtch.LeaveGroup(profileOnion, handle); Future.delayed(Duration(milliseconds: 500), () { + Provider.of(context, listen: false).selectedConversation = null; Navigator.of(context).popUntil((route) => route.settings.name == "conversations"); // dismiss dialog }); }, diff --git a/lib/views/peersettingsview.dart b/lib/views/peersettingsview.dart index cdcfc707..44de9d79 100644 --- a/lib/views/peersettingsview.dart +++ b/lib/views/peersettingsview.dart @@ -230,6 +230,7 @@ class _PeerSettingsViewState extends State { var handle = Provider.of(context, listen: false).onion; Provider.of(context, listen: false).cwtch.LeaveConversation(profileOnion, handle); Future.delayed(Duration(milliseconds: 500), () { + Provider.of(context, listen: false).selectedConversation = null; Navigator.of(context).popUntil((route) => route.settings.name == "conversations"); // dismiss dialog }); }, From 992b26e1ab7aa83a6c42e5a9ed627c482c3fd58e Mon Sep 17 00:00:00 2001 From: Sarah Jamie Lewis Date: Thu, 8 Jul 2021 14:43:01 -0700 Subject: [PATCH 2/2] Max width on UI Landscape Setting Fix #16 --- lib/views/globalsettingsview.dart | 37 ++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index 01f37db2..aa782034 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -93,20 +93,31 @@ class _GlobalSettingsViewState extends State { ); }).toList())), ListTile( - title: Text(AppLocalizations.of(context)!.settingUIColumnLandscape, style: TextStyle(color: settings.current().mainTextColor())), + title: Text( + AppLocalizations.of(context)!.settingUIColumnLandscape, + textWidthBasis: TextWidthBasis.longestLine, + softWrap: true, + style: TextStyle(color: settings.current().mainTextColor()), + ), leading: Icon(Icons.table_chart, color: settings.current().mainTextColor()), - trailing: DropdownButton( - value: settings.uiColumnModeLandscape.toString(), - onChanged: (String? newValue) { - settings.uiColumnModeLandscape = Settings.uiColumnModeFromString(newValue!); - saveSettings(context); - }, - items: Settings.uiColumnModeOptions(true).map>((DualpaneMode value) { - return DropdownMenuItem( - value: value.toString(), - child: Text(Settings.uiColumnModeToString(value, context)), - ); - }).toList())), + trailing: Container( + width: 200.0, + child: DropdownButton( + isExpanded: true, + value: settings.uiColumnModeLandscape.toString(), + onChanged: (String? newValue) { + settings.uiColumnModeLandscape = Settings.uiColumnModeFromString(newValue!); + saveSettings(context); + }, + items: Settings.uiColumnModeOptions(true).map>((DualpaneMode value) { + return DropdownMenuItem( + value: value.toString(), + child: Text( + Settings.uiColumnModeToString(value, context), + overflow: TextOverflow.ellipsis, + ), + ); + }).toList()))), SwitchListTile( title: Text(AppLocalizations.of(context)!.blockUnknownLabel, style: TextStyle(color: settings.current().mainTextColor())), subtitle: Text(AppLocalizations.of(context)!.descriptionBlockUnknownConnections),