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(
leading: Image.asset( color: Theme.of(context).colorScheme.surface,
'assets/backup.png', child: ListTile(
fit: BoxFit.contain, leading: Image.asset(
width: 44, 'assets/backup.png',
), fit: BoxFit.contain,
content: Text(L10n.of(context).setupChatBackupNow), width: 44,
actions: [
TextButton(
onPressed: controller.firstRunBootstrapAction,
child: Text(L10n.of(context).start),
), ),
], title: Text(L10n.of(context).setupChatBackupNow),
trailing: const Icon(Icons.chevron_right_outlined),
onTap: controller.firstRunBootstrapAction,
),
), ),
), ),
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(