add basic emote picker

This commit is contained in:
Sorunome 2020-05-12 07:02:33 +00:00 committed by Christian Pauly
commit f3d3aeebd4
9 changed files with 570 additions and 3 deletions

View file

@ -17,6 +17,7 @@ import '../components/content_banner.dart';
import '../components/matrix.dart';
import '../l10n/l10n.dart';
import '../utils/app_route.dart';
import 'settings_emotes.dart';
class SettingsView extends StatelessWidget {
@override
@ -226,11 +227,22 @@ class _SettingsState extends State<Settings> {
activeColor: Theme.of(context).primaryColor,
onChanged: (bool newValue) async {
Matrix.of(context).renderHtml = newValue;
await client.storeAPI.setItem("chat.fluffy.renderHtml", newValue ? "1" : "0");
await client.storeAPI
.setItem("chat.fluffy.renderHtml", newValue ? "1" : "0");
setState(() => null);
},
),
),
ListTile(
title: Text(L10n.of(context).emoteSettings),
onTap: () async => await Navigator.of(context).push(
AppRoute.defaultRoute(
context,
EmotesSettingsView(),
),
),
trailing: Icon(Icons.insert_emoticon),
),
Divider(thickness: 1),
ListTile(
title: Text(