Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Update icons

vishnukvmdac57a5d90da7
diff --git a/mobile/android/app/src/main/AndroidManifest.xml b/mobile/android/app/src/main/AndroidManifest.xml
index 94bcae1883..16a5c840df 100644
--- a/mobile/android/app/src/main/AndroidManifest.xml
+++ b/mobile/android/app/src/main/AndroidManifest.xml
@@ -15,7 +15,6 @@
android:exported="true"
android:configChanges="orientation|keyboardHidden|keyboard|screenSize|smallestScreenSize|locale|layoutDirection|fontScale|screenLayout|density|uiMode"
android:hardwareAccelerated="true"
- android:enabled="false"
android:windowSoftInputMode="adjustResize">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
@@ -87,9 +86,9 @@
</activity>
<activity-alias
- android:name=".IconLight"
- android:icon="@mipmap/icon-light"
- android:enabled="true"
+ android:name="${applicationId}.IconLight"
+ android:icon="@mipmap/icon_light"
+ android:enabled="false"
android:exported="true"
android:targetActivity=".MainActivity">
<intent-filter>
@@ -98,8 +97,9 @@
</intent-filter>
</activity-alias>
<activity-alias
- android:name=".IconDark"
- android:icon="@mipmap/icon-dark"
+ android:name="${applicationId}.IconDark"
+ android:icon="@mipmap/icon_light"
+ android:enabled="false"
android:exported="true"
android:targetActivity=".MainActivity">
<intent-filter>
@@ -108,8 +108,9 @@
</intent-filter>
</activity-alias>
<activity-alias
- android:name=".IconGreen"
- android:icon="@mipmap/icon-green"
+ android:name="${applicationId}.IconGreen"
+ android:icon="@mipmap/icon_light"
+ android:enabled="false"
android:exported="true"
android:targetActivity=".MainActivity">
<intent-filter>
diff --git a/mobile/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png b/mobile/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png
index efa97a4e8c..987f2d9949 100644
Binary files a/mobile/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png and b/mobile/android/app/src/main/res/drawable-hdpi/ic_launcher_foreground.png differ
diff --git a/mobile/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png b/mobile/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png
index 674449b7d9..64b4992178 100644
Binary files a/mobile/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png and b/mobile/android/app/src/main/res/drawable-mdpi/ic_launcher_foreground.png differ
diff --git a/mobile/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png b/mobile/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png
index 6f0167e58e..1a70735114 100644
Binary files a/mobile/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png and b/mobile/android/app/src/main/res/drawable-xhdpi/ic_launcher_foreground.png differ
diff --git a/mobile/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png b/mobile/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png
index d2c9dad721..f204d0195a 100644
Binary files a/mobile/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png and b/mobile/android/app/src/main/res/drawable-xxhdpi/ic_launcher_foreground.png differ
diff --git a/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png b/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png
index 85ad53bfd5..b47e2fa58d 100644
Binary files a/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png and b/mobile/android/app/src/main/res/drawable-xxxhdpi/ic_launcher_foreground.png differ
diff --git a/mobile/assets/launcher_icon/icon-foreground.png b/mobile/assets/launcher_icon/icon-foreground.png
new file mode 100644
index 0000000000..991f579f15
Binary files /dev/null and b/mobile/assets/launcher_icon/icon-foreground.png differ
diff --git a/mobile/ios/Podfile.lock b/mobile/ios/Podfile.lock
index aeb88a7cec..759e9e1697 100644
--- a/mobile/ios/Podfile.lock
+++ b/mobile/ios/Podfile.lock
@@ -116,6 +116,8 @@ PODS:
- FlutterMacOS
- integration_test (0.0.1):
- Flutter
+ - launcher_icon_switcher (0.0.1):
+ - Flutter
- libwebp (1.5.0):
- libwebp/demux (= 1.5.0)
- libwebp/mux (= 1.5.0)
@@ -267,6 +269,7 @@ DEPENDENCIES:
- image_picker_ios (from `.symlinks/plugins/image_picker_ios/ios`)
- in_app_purchase_storekit (from `.symlinks/plugins/in_app_purchase_storekit/darwin`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
+ - launcher_icon_switcher (from `.symlinks/plugins/launcher_icon_switcher/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- local_auth_ios (from `.symlinks/plugins/local_auth_ios/ios`)
- maps_launcher (from `.symlinks/plugins/maps_launcher/ios`)
@@ -371,6 +374,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/in_app_purchase_storekit/darwin"
integration_test:
:path: ".symlinks/plugins/integration_test/ios"
+ launcher_icon_switcher:
+ :path: ".symlinks/plugins/launcher_icon_switcher/ios"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
local_auth_ios:
@@ -443,7 +448,7 @@ SPEC CHECKSUMS:
cupertino_http: 947a233f40cfea55167a49f2facc18434ea117ba
dart_ui_isolate: d5bcda83ca4b04f129d70eb90110b7a567aece14
device_info_plus: c6fb39579d0f423935b0c9ce7ee2f44b71b9fce6
- ffmpeg-kit-ios-full-gpl: 80adc341962e55ef709e36baa8ed9a70cf4ea62b
+ ffmpeg-kit-ios-full-gpl: 78f81da9b8c14f62f5013dd90f0c9c80bd720140
ffmpeg_kit_flutter_full_gpl: 8d15c14c0c3aba616fac04fe44b3d27d02e3c330
file_saver: 503e386464dbe118f630e17b4c2e1190fa0cf808
Firebase: d80354ed7f6df5f9aca55e9eb47cc4b634735eaf
@@ -469,6 +474,7 @@ SPEC CHECKSUMS:
image_picker_ios: c560581cceedb403a6ff17f2f816d7fea1421fc1
in_app_purchase_storekit: a1ce04056e23eecc666b086040239da7619cd783
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
+ launcher_icon_switcher: 8e0ad2131a20c51c1dd939896ee32e70cd845b37
libwebp: 02b23773aedb6ff1fd38cec7a77b81414c6842a8
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
local_auth_ios: 5046a18c018dd973247a0564496c8898dbb5adf9
@@ -515,4 +521,4 @@ SPEC CHECKSUMS:
PODFILE CHECKSUM: 20e086e6008977d43a3d40260f3f9bffcac748dd
-COCOAPODS: 1.16.2
+COCOAPODS: 1.15.2
diff --git a/mobile/ios/Runner.xcodeproj/project.pbxproj b/mobile/ios/Runner.xcodeproj/project.pbxproj
index 7bf29069fb..23e2ac4c72 100644
--- a/mobile/ios/Runner.xcodeproj/project.pbxproj
+++ b/mobile/ios/Runner.xcodeproj/project.pbxproj
@@ -308,6 +308,7 @@
"${BUILT_PRODUCTS_DIR}/image_picker_ios/image_picker_ios.framework",
"${BUILT_PRODUCTS_DIR}/in_app_purchase_storekit/in_app_purchase_storekit.framework",
"${BUILT_PRODUCTS_DIR}/integration_test/integration_test.framework",
+ "${BUILT_PRODUCTS_DIR}/launcher_icon_switcher/launcher_icon_switcher.framework",
"${BUILT_PRODUCTS_DIR}/libwebp/libwebp.framework",
"${BUILT_PRODUCTS_DIR}/local_auth_darwin/local_auth_darwin.framework",
"${BUILT_PRODUCTS_DIR}/local_auth_ios/local_auth_ios.framework",
@@ -402,6 +403,7 @@
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/image_picker_ios.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/in_app_purchase_storekit.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/integration_test.framework",
+ "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/launcher_icon_switcher.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/libwebp.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_darwin.framework",
"${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/local_auth_ios.framework",
@@ -647,7 +649,7 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
- ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = IconLight;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
@@ -712,9 +714,9 @@
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
ALWAYS_SEARCH_USER_PATHS = NO;
- "ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES[sdk=*]" = "IconLight IconDark IconGreen";
- "ASSETCATALOG_COMPILER_APPICON_NAME[sdk=*]" = IconLight;
- ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = YES;
+ "ASSETCATALOG_COMPILER_ALTERNATE_APPICON_NAMES[sdk= IconLight;
+ "ASSETCATALOG_COMPILER_APPICON_NAME[sdk= IconLight;
+ ASSETCATALOG_COMPILER_INCLUDE_ALL_APPICON_ASSETS = IconLight;
CLANG_ANALYZER_NONNULL = YES;
CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
CLANG_CXX_LIBRARY = "libc++";
diff --git a/mobile/lib/ui/home/landing_page_widget.dart b/mobile/lib/ui/home/landing_page_widget.dart
index bdc1e8a03e..edd65477de 100644
--- a/mobile/lib/ui/home/landing_page_widget.dart
+++ b/mobile/lib/ui/home/landing_page_widget.dart
@@ -4,6 +4,8 @@ import 'dart:io';
import 'package:dots_indicator/dots_indicator.dart';
import "package:flutter/foundation.dart";
import 'package:flutter/material.dart';
+import "package:launcher_icon_switcher/launcher_icon_switcher.dart";
+import "package:logging/logging.dart";
import "package:photos/app.dart";
import 'package:photos/core/configuration.dart';
import 'package:photos/ente_theme_data.dart';
@@ -155,7 +157,7 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {
key: const ValueKey("signInButton"),
style:
Theme.of(context).colorScheme.optionalActionButtonStyle,
- onPressed: _navigateToSignInPage,
+ onPressed: _changeIcon,
child: Text(
S.of(context).existingUser,
style: const TextStyle(
@@ -253,6 +255,23 @@ class _LandingPageWidgetState extends State<LandingPageWidget> {
);
}
+ Future<void> _changeIcon() async {
+ Logger("Icon").info("Initializing");
+ await LauncherIconSwitcher()
+ .initialize(['IconLight', 'IconDark', 'IconGreen'], 'IconLight');
+ Logger("Icon").info("Initialized");
+ final currentIcon = await LauncherIconSwitcher().getCurrentIcon();
+ Logger("Icon").info("Current Icon: " + currentIcon);
+ if (currentIcon == 'IconLight') {
+ await LauncherIconSwitcher().setIcon('IconDark');
+ } else if (currentIcon == 'IconDark') {
+ await LauncherIconSwitcher().setIcon('IconGreen');
+ } else {
+ await LauncherIconSwitcher().setIcon('IconLight');
+ }
+ Logger("Icon").info("Changed");
+ }
+
void _navigateToSignInPage() {
updateService.hideChangeLog().ignore();
Widget page;
diff --git a/mobile/pubspec.lock b/mobile/pubspec.lock
index a1ef8a618b..a2fdf0e09f 100644
--- a/mobile/pubspec.lock
+++ b/mobile/pubspec.lock
@@ -1459,6 +1459,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "0.9.1"
+ launcher_icon_switcher:
+ dependency: "direct main"
+ description:
+ name: launcher_icon_switcher
+ sha256: a1e0778ed016107077f54f22b4987f322315de8d3df31a6ed494134f55c0ff41
+ url: "https://pub.dev"
+ source: hosted
+ version: "0.0.2"
leak_tracker:
dependency: transitive
description:
diff --git a/mobile/pubspec.yaml b/mobile/pubspec.yaml
index 9dd558e365..e364e74318 100644
--- a/mobile/pubspec.yaml
+++ b/mobile/pubspec.yaml
@@ -111,6 +111,7 @@ dependencies:
intl: ^0.19.0
json_annotation: ^4.8.0
latlong2: ^0.9.0
+ launcher_icon_switcher: ^0.0.2
like_button: ^2.0.5
loading_animations: ^2.1.0
local_auth: ^2.1.5
@@ -269,7 +270,7 @@ dev_dependencies:
test: ^1.22.0
flutter_icons:
- adaptive_icon_foreground: "assets/launcher_icon/ente-icon-foreground.png"
+ adaptive_icon_foreground: "assets/launcher_icon/icon-foreground.png"
adaptive_icon_background: "#ffffff"
# android: "icon_green"