chore: Crop shortcut file on android and cache it
This commit is contained in:
parent
a74c00f41c
commit
1305171219
3 changed files with 50 additions and 14 deletions
|
|
@ -15,6 +15,7 @@ import 'package:fluffychat/utils/client_download_content_extension.dart';
|
|||
import 'package:fluffychat/utils/client_manager.dart';
|
||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||
import 'package:fluffychat/utils/platform_infos.dart';
|
||||
import 'package:fluffychat/utils/shortcut_memory_icon.dart';
|
||||
|
||||
Future<void> pushHelper(
|
||||
PushNotification notification, {
|
||||
|
|
@ -312,9 +313,10 @@ Future<void> _setShortcut(
|
|||
action: AppConfig.inviteLinkPrefix + event.room.id,
|
||||
shortLabel: title,
|
||||
conversationShortcut: true,
|
||||
icon: avatarFile == null
|
||||
? null
|
||||
: ShortcutMemoryIcon(jpegImage: avatarFile).toString(),
|
||||
icon: await avatarFile?.toShortcutMemoryIcon(
|
||||
event.room.id,
|
||||
event.room.client.database,
|
||||
),
|
||||
shortcutIconAsset: avatarFile == null
|
||||
? ShortcutIconAsset.androidAsset
|
||||
: ShortcutIconAsset.memoryAsset,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue