Merge branch 'krille/minor-fixes' into 'main'

fix: Minor fixes

See merge request famedly/fluffychat!559
This commit is contained in:
Krille Fear 2021-11-21 08:26:28 +00:00
commit 14110549b8
3 changed files with 16 additions and 14 deletions

View File

@ -188,19 +188,18 @@ class ChatListView extends StatelessWidget {
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
curve: Curves.bounceInOut, curve: Curves.bounceInOut,
decoration: const BoxDecoration(), decoration: const BoxDecoration(),
child: MaterialBanner( child: Material(
color: Theme.of(context).colorScheme.surface,
child: ListTile(
leading: Image.asset( leading: Image.asset(
'assets/backup.png', 'assets/backup.png',
fit: BoxFit.contain, fit: BoxFit.contain,
width: 44, width: 44,
), ),
content: Text(L10n.of(context).setupChatBackupNow), title: Text(L10n.of(context).setupChatBackupNow),
actions: [ trailing: const Icon(Icons.chevron_right_outlined),
TextButton( onTap: controller.firstRunBootstrapAction,
onPressed: controller.firstRunBootstrapAction,
child: Text(L10n.of(context).start),
), ),
],
), ),
), ),
Expanded(child: _ChatListViewBody(controller)), Expanded(child: _ChatListViewBody(controller)),

View File

@ -269,9 +269,9 @@ class BackgroundPush {
if (_fcmToken?.isEmpty ?? true) { if (_fcmToken?.isEmpty ?? true) {
try { try {
_fcmToken = await _fcmSharedIsolate?.getToken(); _fcmToken = await _fcmSharedIsolate?.getToken();
if (_fcmToken == null) throw Exception('PushToken is null'); if (_fcmToken == null) throw ('PushToken is null');
} catch (e, s) { } catch (e, s) {
Logs().e('[Push] cannot get token', e, s); Logs().w('[Push] cannot get token', e, e is String ? null : s);
await _noFcmWarning(); await _noFcmWarning();
return; return;
} }

View File

@ -50,6 +50,9 @@ class FlutterFluffyBoxDatabase extends FluffyBoxDatabase {
hiverCipher = HiveAesCipher(base64Url.decode(rawEncryptionKey)); hiverCipher = HiveAesCipher(base64Url.decode(rawEncryptionKey));
} on MissingPluginException catch (_) { } on MissingPluginException catch (_) {
Logs().i('FluffyBox encryption is not supported on this platform'); Logs().i('FluffyBox encryption is not supported on this platform');
} catch (_) {
const FlutterSecureStorage().delete(key: _cipherStorageKey);
rethrow;
} }
final db = FluffyBoxDatabase( final db = FluffyBoxDatabase(