diff --git a/lib/views/doublecolview.dart b/lib/views/doublecolview.dart index ef632e7..d369f9b 100644 --- a/lib/views/doublecolview.dart +++ b/lib/views/doublecolview.dart @@ -2,6 +2,7 @@ import 'package:flutter/material.dart'; import 'package:provider/provider.dart'; import '../main.dart'; +import '../model.dart'; import 'contactsview.dart'; import 'messageview.dart'; @@ -26,7 +27,12 @@ class _DoubleColumnViewState extends State { child: flwtch.selectedConversation == "" ? Center(child: Text("pick a contact")) : //dev - Container(child: MessageView()), + MultiProvider( + providers: [ + ChangeNotifierProvider.value(value: Provider.of(context)), + ChangeNotifierProvider.value(value: Provider.of(context).contactList.getContact(flwtch.selectedConversation)), + ], + child: Container(child: MessageView())), ), ], ); diff --git a/lib/views/globalsettingsview.dart b/lib/views/globalsettingsview.dart index 29882b5..56e3072 100644 --- a/lib/views/globalsettingsview.dart +++ b/lib/views/globalsettingsview.dart @@ -74,6 +74,26 @@ class _GlobalSettingsViewState extends State { }, secondary: Icon(Icons.lightbulb_outline, color: settings.current().mainTextColor()), ), + ListTile( + title: Text(/*AppLocalizations.of(context).settingLanguage*/"UI Columns", style: TextStyle(color: settings.current().mainTextColor())), + leading: Icon(Icons.table_chart, color: settings.current().mainTextColor()), + trailing: DropdownButton( + value: Provider.of(context).locale.languageCode, + onChanged: (String newValue) { + if (newValue == "Double (1:2)") { + Provider.of(context).columns = [1, 2]; + } else if (newValue == "Double (1:4)") { + Provider.of(context).columns = [1, 4]; + } else { + Provider.of(context).columns = [1]; + } + }, + items: ["Single", "Double (1:2)", "Double (1:4)"].map>((String value) { + return DropdownMenuItem( + value: value, + child: Text(value), + ); + }).toList())), SwitchListTile( title: Text(AppLocalizations.of(context).blockUnknownLabel, style: TextStyle(color: settings.current().mainTextColor())), subtitle: Text(AppLocalizations.of(context).descriptionBlockUnknownConnections),