chore: Follow up push avatars
This commit is contained in:
parent
e8ee3722db
commit
15543275c4
2 changed files with 7 additions and 5 deletions
|
|
@ -51,7 +51,7 @@ extension ClientDownloadContentExtension on Client {
|
||||||
if (rounded) {
|
if (rounded) {
|
||||||
final image = decodeImage(imageData);
|
final image = decodeImage(imageData);
|
||||||
if (image != null) {
|
if (image != null) {
|
||||||
imageData = copyCropCircle(image).toUint8List();
|
imageData = encodePng(copyCropCircle(image));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,6 +17,8 @@ import 'package:fluffychat/utils/client_manager.dart';
|
||||||
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
|
||||||
import 'package:fluffychat/utils/platform_infos.dart';
|
import 'package:fluffychat/utils/platform_infos.dart';
|
||||||
|
|
||||||
|
const notificationAvatarDimension = 128;
|
||||||
|
|
||||||
Future<void> pushHelper(
|
Future<void> pushHelper(
|
||||||
PushNotification notification, {
|
PushNotification notification, {
|
||||||
Client? client,
|
Client? client,
|
||||||
|
|
@ -165,8 +167,8 @@ Future<void> _tryPushHelper(
|
||||||
.downloadMxcCached(
|
.downloadMxcCached(
|
||||||
avatar,
|
avatar,
|
||||||
thumbnailMethod: ThumbnailMethod.crop,
|
thumbnailMethod: ThumbnailMethod.crop,
|
||||||
width: 128,
|
width: notificationAvatarDimension,
|
||||||
height: 128,
|
height: notificationAvatarDimension,
|
||||||
animated: false,
|
animated: false,
|
||||||
isThumbnail: true,
|
isThumbnail: true,
|
||||||
rounded: true,
|
rounded: true,
|
||||||
|
|
@ -184,8 +186,8 @@ Future<void> _tryPushHelper(
|
||||||
.downloadMxcCached(
|
.downloadMxcCached(
|
||||||
senderAvatar,
|
senderAvatar,
|
||||||
thumbnailMethod: ThumbnailMethod.crop,
|
thumbnailMethod: ThumbnailMethod.crop,
|
||||||
width: 128,
|
width: notificationAvatarDimension,
|
||||||
height: 128,
|
height: notificationAvatarDimension,
|
||||||
animated: false,
|
animated: false,
|
||||||
isThumbnail: true,
|
isThumbnail: true,
|
||||||
rounded: true,
|
rounded: true,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue