use helper functions

This commit is contained in:
shilangyu 2021-01-02 15:41:08 +00:00
parent 86ad944bbd
commit 81ea5c051b
2 changed files with 3 additions and 2 deletions

View File

@ -209,7 +209,7 @@ class CommunitiesTab extends HookWidget {
],
),
trailing: _CommunitySubscribeToggle(
instanceHost: comm.communityActorId.split('/')[2],
instanceHost: comm.instanceHost,
communityId: comm.communityId,
),
),

View File

@ -1,4 +1,5 @@
import 'package:flutter/cupertino.dart';
import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter_hooks/flutter_hooks.dart';
import 'package:flutter_slidable/flutter_slidable.dart';
@ -72,7 +73,7 @@ class AppearanceConfigPage extends HookWidget {
for (final theme in ThemeMode.values)
RadioListTile<ThemeMode>(
value: theme,
title: Text(theme.toString().split('.')[1]),
title: Text(describeEnum(theme)),
groupValue: configStore.theme,
onChanged: (selected) {
configStore.theme = selected;