♿ Some useful options
This commit is contained in:
parent
b5da8ece4a
commit
00092ba7b6
@ -2,6 +2,7 @@ import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:provider/provider.dart';
|
||||
import 'package:shared_preferences/shared_preferences.dart';
|
||||
import 'package:solian/controllers/chat_events_controller.dart';
|
||||
import 'package:solian/exts.dart';
|
||||
import 'package:solian/providers/theme_switcher.dart';
|
||||
import 'package:solian/router.dart';
|
||||
@ -93,6 +94,18 @@ class _SettingScreenState extends State<SettingScreen> {
|
||||
AppRouter.instance.pushNamed('about');
|
||||
},
|
||||
),
|
||||
TextButton(
|
||||
style: const ButtonStyle(
|
||||
visualDensity: VisualDensity(horizontal: -4, vertical: -4),
|
||||
),
|
||||
child: Text('messageHistoryWipe'.tr),
|
||||
onPressed: () {
|
||||
final chatHistory = ChatEventController();
|
||||
chatHistory.initialize().then((_) async {
|
||||
await chatHistory.database.localEvents.wipeLocalEvents();
|
||||
});
|
||||
},
|
||||
),
|
||||
],
|
||||
).paddingSymmetric(horizontal: 12, vertical: 8),
|
||||
],
|
||||
|
@ -373,4 +373,5 @@ const i18nEnglish = {
|
||||
'messageOutOfSync': 'May Out of Sync with Server',
|
||||
'messageOutOfSyncCaption':
|
||||
'Since the App has entered the background, there may be a time difference between the message list and the server. Click to Refresh.',
|
||||
'messageHistoryWipe': 'Wipe local message history',
|
||||
};
|
||||
|
@ -339,4 +339,5 @@ const i18nSimplifiedChinese = {
|
||||
'callStatusReconnected': '重连中',
|
||||
'messageOutOfSync': '消息可能与服务器脱节',
|
||||
'messageOutOfSyncCaption': '由于 App 进入后台,消息列表可能与服务器存在时差,点击刷新。',
|
||||
'messageHistoryWipe': '清除消息记录',
|
||||
};
|
||||
|
@ -1,3 +1,5 @@
|
||||
import 'dart:math' as math;
|
||||
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:get/get.dart';
|
||||
import 'package:solian/models/account_status.dart';
|
||||
@ -54,6 +56,7 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
|
||||
backgroundColor:
|
||||
SolianTheme.isLargeScreen(context) ? Colors.transparent : null,
|
||||
child: SafeArea(
|
||||
bottom: false,
|
||||
child: Column(
|
||||
children: [
|
||||
Obx(() {
|
||||
@ -187,7 +190,10 @@ class _AppNavigationDrawerState extends State<AppNavigationDrawer> {
|
||||
},
|
||||
),
|
||||
],
|
||||
).paddingOnly(top: 8)
|
||||
).paddingOnly(
|
||||
top: 8,
|
||||
bottom: math.max(8, MediaQuery.of(context).padding.bottom),
|
||||
),
|
||||
],
|
||||
),
|
||||
),
|
||||
|
Loading…
Reference in New Issue
Block a user