mirror of
https://gitlab.com/famedly/fluffychat.git
synced 2024-12-24 14:32:37 +01:00
refactor: MVC multiple emote settings
This commit is contained in:
parent
f23fdccada
commit
a64ada50d4
@ -4,6 +4,7 @@ import 'package:fluffychat/views/archive.dart';
|
||||
import 'package:fluffychat/views/homeserver_picker.dart';
|
||||
import 'package:fluffychat/views/invitation_selection.dart';
|
||||
import 'package:fluffychat/views/settings_emotes.dart';
|
||||
import 'package:fluffychat/views/settings_multiple_emotes.dart';
|
||||
import 'package:fluffychat/views/sign_up.dart';
|
||||
import 'package:fluffychat/views/sign_up_password.dart';
|
||||
import 'package:fluffychat/views/widgets/matrix.dart';
|
||||
@ -23,7 +24,6 @@ import 'package:fluffychat/views/ui/settings_ui.dart';
|
||||
import 'package:fluffychat/views/settings_3pid.dart';
|
||||
import 'package:fluffychat/views/device_settings.dart';
|
||||
import 'package:fluffychat/views/settings_ignore_list.dart';
|
||||
import 'package:fluffychat/views/ui/settings_multiple_emotes_ui.dart';
|
||||
import 'package:fluffychat/views/ui/settings_notifications_ui.dart';
|
||||
import 'package:fluffychat/views/settings_style.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
18
lib/views/settings_multiple_emotes.dart
Normal file
18
lib/views/settings_multiple_emotes.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
import 'ui/settings_multiple_emotes_ui.dart';
|
||||
|
||||
class MultipleEmotesSettings extends StatefulWidget {
|
||||
final String roomId;
|
||||
|
||||
MultipleEmotesSettings(this.roomId, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
MultipleEmotesSettingsController createState() =>
|
||||
MultipleEmotesSettingsController();
|
||||
}
|
||||
|
||||
class MultipleEmotesSettingsController extends State<MultipleEmotesSettings> {
|
||||
@override
|
||||
Widget build(BuildContext context) => MultipleEmotesSettingsUI(this);
|
||||
}
|
@ -1,17 +1,19 @@
|
||||
import 'package:adaptive_page_layout/adaptive_page_layout.dart';
|
||||
import 'package:fluffychat/views/settings_multiple_emotes.dart';
|
||||
import 'package:fluffychat/views/widgets/matrix.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:famedlysdk/famedlysdk.dart';
|
||||
import 'package:flutter_gen/gen_l10n/l10n.dart';
|
||||
|
||||
class MultipleEmotesSettings extends StatelessWidget {
|
||||
final String roomId;
|
||||
class MultipleEmotesSettingsUI extends StatelessWidget {
|
||||
final MultipleEmotesSettingsController controller;
|
||||
|
||||
MultipleEmotesSettings(this.roomId, {Key key}) : super(key: key);
|
||||
MultipleEmotesSettingsUI(this.controller, {Key key}) : super(key: key);
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final room = Matrix.of(context).client.getRoomById(roomId);
|
||||
final room =
|
||||
Matrix.of(context).client.getRoomById(controller.widget.roomId);
|
||||
return Scaffold(
|
||||
appBar: AppBar(
|
||||
leading: BackButton(),
|
||||
|
Loading…
Reference in New Issue
Block a user