finally fix icon

This commit is contained in:
OfficialDakari 2025-05-18 17:13:20 +05:00
parent a88c08f610
commit e99be68eef
19 changed files with 54 additions and 44 deletions

View File

@ -1,15 +1,12 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24"
android:tint="#FFFFFF">
<group android:scaleX="0.15715303"
android:scaleY="0.15715303"
android:translateX="0.96"
android:translateY="0.96">
<path
android:pathData="M130.9,0a50.8,50.8 0,0 0,-34.2 18c-0.5,-0.2 -1,-1 -1,-1.7a7,7 0,0 0,-3.5 -6.8,7.8 7.8,0 0,0 -10.6,3.3c-0.5,0.8 -1.3,1.3 -2,1 -0.8,0 -1.5,-0.8 -1.5,-1.5 -0.5,-2.5 -2,-4.5 -4.3,-5.5 -4.8,-2 -9.8,0.8 -10.6,5.3 -0.3,0.8 -0.8,1.5 -1.5,1.5 -0.8,0.3 -1.5,-0.3 -2,-1a8,8 0,0 0,-6.5 -3.8,8 8,0 0,0 -7.8,7.3v0.6c0,0.8 -0.5,1.5 -1,1.8L44,18.5C35.8,7.7 15.6,-2.2 5.6,1c-8.1,2.8 -4.3,42.6 4,53.4 1.5,2 2.8,3.5 3.8,4.5 -0.3,0.8 -1,1.5 -1.8,1.5 -1.3,0 -2.5,0.5 -3.5,1.3a7.7,7.7 0,0 0,3 13.4c0.8,0.3 1.5,1 1.5,1.8s-0.5,1.8 -1.3,2c-1,0.5 -2,1 -2.8,2 -4,5.8 0,12.3 5.5,12.3a2,2 0,0 1,1.8 1.3c0.3,0.8 0.3,1.5 -0.5,2a6.5,6.5 0,0 0,-2 5.5c0.3,2.8 2,5.3 4.8,6.5 1.5,0.8 3,0.8 4.5,0.5 0.8,-0.3 1.5,0 2,0.8 0.5,0.5 0.5,1.5 0.3,2 -0.8,1.5 -1,3.3 -0.5,5a7.7,7.7 0,0 0,5.5 5.5c2.5,0.5 4.3,-0.3 5.5,-0.8 0.5,-0.3 -3.3,9 -6,15.4 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3 -3,-1 -4,-2.5 -4.6,-6.3 -5.4,-26.2 -1,-27.7 1,-0.3 1.9,-0.4 3,-0.4zM123.9,12.4c1,0 2,0 2.9,0.4 4.5,1.5 3.7,21.4 -0.8,27.7 -0.8,1 -1.8,1.7 -2.8,2 -0.5,0 -0.7,-0.5 -1,-0.8 -0.5,-0.5 -0.5,-1.5 0,-2a7,7 0,0 0,1.3 -4c0.3,-1.8 -0.5,-3.5 -1.5,-4.8a7,7 0,0 0,-5.8 -3c-1,0 -2,0 -3,0.5 -0.7,0.3 -1.5,0 -2,-0.5s-0.8,-1.2 -0.5,-2a7,7 0,0 0,0 -4.5c-0.2,-1.3 -0.7,-2.1 -1.8,-2.6a27.6,27.6 0,0 1,15 -6.4zM40.2,64.4a9.3,9.3 0,0 1,9.3 9.4,9.3 9.3,0 0,1 -9.3,9.3 9.3,9.3 0,0 1,-9.3 -9.3,9.3 9.3,0 0,1 9.3,-9.3zM100.9,64.4a9.3,9.3 0,0 1,9.3 9.4,9.3 9.3,0 0,1 -9.3,9.3 9.3,9.3 0,0 1,-9.3 -9.3,9.3 9.3,0 0,1 9.3,-9.3zM70.7,70c4.6,0 9.3,1.2 9.3,3.9a9.3,9.3 0,1 1,-18.6 0c0,-2.5 4.6,-3.9 9.3,-3.9z"
android:fillColor="#4d3f92"/>
</group>
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<path
android:pathData="m89.41,58.09l0,16.36l-17.7,10.22l-17.71,10.22l-2.59,-1.5l-32.82,-18.94l0,-40.89l17.7,-10.23l17.71,-10.22l28.33,16.36l4.49,2.59l2.59,1.5l0,8.17l-35.41,20.45l-7.08,-4.09l0,-8.18l21.25,-12.27l-14.17,-8.17l-21.25,12.26l0,24.54l21.25,12.26l0.03,0.02l0.02,-0.05l35.36,-20.41z"
android:fillType="evenOdd"
android:fillColor="#aaaaaa">
</path>
</vector>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 803 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9.0 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 579 B

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.1 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,29 +1,27 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:aapt="http://schemas.android.com/aapt"
android:width="108dp"
android:height="108dp"
android:viewportWidth="108"
android:viewportHeight="108">
<group android:scaleX="0.33822063"
android:scaleY="0.33822063"
android:translateX="30.24"
android:translateY="31.24">
<group
android:scaleX="0.66"
android:scaleY="0.66"
android:translateX="18"
android:translateY="18">
<path
android:pathData="M130.9,74.3c1.5,-0.3 2.8,-1 3.8,-2 4,-5.3 0.8,-11.8 -4.5,-12.6 -0.8,0 -1.5,-0.8 -1.5,-1.5v-0.5c0.8,-0.8 1.5,-1.8 2.5,-3.3 8.1,-10.8 11.8,-50.6 3.8,-53.7 -9.8,-3.3 -29.7,6.3 -38.3,17.4 -0.5,-0.3 -1,-1 -1,-1.8a7,7 0,0 0,-3.5 -6.8,7.8 7.8,0 0,0 -10.6,3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0.8 3.3,1.3 5,0.8 2.8,-0.5 5,-2.8 5.8,-5.3 0.5,-1.8 0.3,-3.5 -0.5,-5.3 -0.3,-0.8 -0.3,-1.5 0.3,-2s1.3,-0.8 2,-0.8c1.8,0.3 3.3,0.3 4.8,-0.5 2.3,-1 3.8,-3 4.3,-5.5a7,7 0,0 0,-2 -6.5c-0.5,-0.5 -0.8,-1.3 -0.5,-2 0.3,-0.7 1,-1.3 1.8,-1.3 1.8,0 3.8,-0.5 5,-2a7.6,7.6 0,0 0,-2.5 -12.6c-0.8,-0.3 -1.3,-1 -1.3,-2 0,-0.9 0.7,-1.6 1.5,-1.6z"
android:fillColor="#4d3f92"/>
<path
android:pathData="M110.7,21.4a7,7 0,0 1,0 4.5c-0.3,0.8 0,1.5 0.5,2s1.3,0.8 2,0.5c1,-0.5 2,-0.5 3,-0.5a7,7 0,0 1,5.8 3c1,1.3 1.8,3 1.5,4.8a7,7 0,0 1,-1.3 4c-0.5,0.5 -0.5,1.5 0,2 0.3,0.3 0.5,0.8 1,0.8 1,-0.3 2,-1 2.8,-2 4.5,-6.3 5.3,-26.2 0.8,-27.7s-12.3,1.5 -17.9,6c1.1,0.5 1.6,1.3 1.8,2.6z"
android:fillColor="#fff"/>
<path
android:pathData="M18.3,42.8l0.8,-0.8c0.5,-0.8 0.3,-1.5 0,-2a7.6,7.6 0,0 1,-1.3 -5.8c0.5,-2.8 2.8,-5 5.5,-5.8 1.5,-0.5 3,-0.3 4.5,0.3 0.8,0.3 1.5,0 2,-0.5s0.8,-1.3 0.5,-2a7,7 0,0 1,0 -4.5c0.3,-1 0.8,-2 1.5,-2.8 -5.5,-4.5 -13.9,-7.8 -18.4,-6.3 -4.5,1.5 -3.7,21.4 0.9,27.7 1,1.5 2.2,2.2 4,2.5z"
android:fillColor="#fff"/>
<path
android:pathData="M40.2,73.8m-9.3,0a9.3,9.3 0,1 1,18.6 0a9.3,9.3 0,1 1,-18.6 0"
android:fillColor="#fff"/>
<path
android:pathData="M80,73.8a9.3,9.3 0,1 1,-18.6 0c0,-5 18.6,-5.3 18.6,0z"
android:fillColor="#fff"/>
<path
android:pathData="M100.9,73.8m-9.3,0a9.3,9.3 0,1 1,18.6 0a9.3,9.3 0,1 1,-18.6 0"
android:fillColor="#fff"/>
android:pathData="m89.41,58.09l0,16.36l-17.7,10.22l-17.71,10.22l-2.59,-1.5l-32.82,-18.94l0,-40.89l17.7,-10.23l17.71,-10.22l28.33,16.36l4.49,2.59l2.59,1.5l0,8.17l-35.41,20.45l-7.08,-4.09l0,-8.18l21.25,-12.27l-14.17,-8.17l-21.25,12.26l0,24.54l21.25,12.26l0.03,0.02l0.02,-0.05l35.36,-20.41z">
<aapt:attr name="android:fillColor">
<gradient
android:startX="18.59"
android:startY="13.11"
android:endX="18.59"
android:endY="94.89"
android:type="linear">
<item android:offset="0" android:color="#FF406FBF"/>
<item android:offset="1" android:color="#FF23509D"/>
</gradient>
</aapt:attr>
</path>
</group>
</vector>

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

After

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 20 KiB

View File

@ -1,5 +1,6 @@
import 'dart:typed_data';
import 'package:image/image.dart';
import 'package:matrix/matrix.dart';
extension ClientDownloadContentExtension on Client {
@ -10,6 +11,7 @@ extension ClientDownloadContentExtension on Client {
bool isThumbnail = false,
bool? animated,
ThumbnailMethod? thumbnailMethod,
bool rounded = false,
}) async {
// To stay compatible with previous storeKeys:
final cacheKey = isThumbnail
@ -44,10 +46,17 @@ extension ClientDownloadContentExtension on Client {
if (response.statusCode != 200) {
throw Exception();
}
final remoteData = response.bodyBytes;
var imageData = response.bodyBytes;
await database?.storeFile(cacheKey, remoteData, 0);
if (rounded) {
final image = decodeImage(imageData);
if (image != null) {
imageData = encodePng(copyCropCircle(image));
}
}
return remoteData;
await database?.storeFile(cacheKey, imageData, 0);
return imageData;
}
}