π End-to-end encrypted cloud for everything.
Dart 2faandroidauthye2eeencryptionend-to-end-encryptionfluttergolanggoogle-photosgoogle-photos-alternativeiosopensourcephotosprivacyprivacy-toolstypescriptzero-knowledge
fix(home-widget): update default image caption & rename totalMemories
Prateek Sunala518bbd608bb
diff --git a/mobile/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt b/mobile/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.ktindex 884042afb3..81ac6cc5c4 100644--- a/mobile/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt+++ b/mobile/android/app/src/main/kotlin/io/ente/photos/EnteAlbumsWidgetProvider.kt@@ -32,13 +32,13 @@ class EnteAlbumsWidgetProvider : HomeWidgetProvider() {val views =RemoteViews(context.packageName, R.layout.albums_widget_layout).apply {- val totalMemories =- widgetData.getInt("totalMemories", 0)+ val totalAlbums =+ widgetData.getInt("totalAlbums", 0)var randomNumber = -1var imagePath: String? = null- if (totalMemories > 0) {+ if (totalAlbums > 0) {randomNumber =- (0 until totalMemories!!).random()+ (0 until totalAlbums!!).random()imagePath =widgetData.getString("albums_widget_" +diff --git a/mobile/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt b/mobile/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.ktindex 0e7404adac..082810a654 100644--- a/mobile/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt+++ b/mobile/android/app/src/main/kotlin/io/ente/photos/EntePeopleWidgetProvider.kt@@ -32,13 +32,13 @@ class EntePeopleWidgetProvider : HomeWidgetProvider() {val views =RemoteViews(context.packageName, R.layout.people_widget_layout).apply {- val totalMemories =- widgetData.getInt("totalMemories", 0)+ val totalPeople =+ widgetData.getInt("totalPeople", 0)var randomNumber = -1var imagePath: String? = null- if (totalMemories > 0) {+ if (totalPeople > 0) {randomNumber =- (0 until totalMemories!!).random()+ (0 until totalPeople!!).random()imagePath =widgetData.getString("people_widget_" +diff --git a/mobile/android/app/src/main/res/layout/albums_widget_layout.xml b/mobile/android/app/src/main/res/layout/albums_widget_layout.xmlindex b8ff8dd548..a24d08014d 100644--- a/mobile/android/app/src/main/res/layout/albums_widget_layout.xml+++ b/mobile/android/app/src/main/res/layout/albums_widget_layout.xml@@ -72,7 +72,7 @@android:id="@+id/widget_placeholder_text"android:layout_width="wrap_content"android:layout_height="wrap_content"- android:text="Your albums will appear here"+ android:text="Go to Settings->General to customise the widget"android:textSize="14sp"android:gravity="center_horizontal"android:textColor="@color/widget_text_color"diff --git a/mobile/android/app/src/main/res/layout/memory_widget_layout.xml b/mobile/android/app/src/main/res/layout/memory_widget_layout.xmlindex 22dd0af334..7f831b1f94 100644--- a/mobile/android/app/src/main/res/layout/memory_widget_layout.xml+++ b/mobile/android/app/src/main/res/layout/memory_widget_layout.xml@@ -72,7 +72,7 @@android:id="@+id/widget_placeholder_text"android:layout_width="wrap_content"android:layout_height="wrap_content"- android:text="Your memories will appear here"+ android:text="Go to Settings->General to customise the widget"android:textSize="14sp"android:gravity="center_horizontal"android:textColor="@color/widget_text_color"diff --git a/mobile/android/app/src/main/res/layout/people_widget_layout.xml b/mobile/android/app/src/main/res/layout/people_widget_layout.xmlindex 9be85822aa..1f5e1f17be 100644--- a/mobile/android/app/src/main/res/layout/people_widget_layout.xml+++ b/mobile/android/app/src/main/res/layout/people_widget_layout.xml@@ -72,7 +72,7 @@android:id="@+id/widget_placeholder_text"android:layout_width="wrap_content"android:layout_height="wrap_content"- android:text="People related photos will appear here"+ android:text="Go to Settings->General to customise the widget"android:textSize="14sp"android:gravity="center_horizontal"android:textColor="@color/widget_text_color"diff --git a/mobile/ios/EnteAlbumWidget/EnteAlbumWidget.swift b/mobile/ios/EnteAlbumWidget/EnteAlbumWidget.swiftindex a9413f0789..4552db4db2 100644--- a/mobile/ios/EnteAlbumWidget/EnteAlbumWidget.swift+++ b/mobile/ios/EnteAlbumWidget/EnteAlbumWidget.swift@@ -39,13 +39,13 @@ struct Provider: TimelineProvider {direction: .backward)!- var totalMemories =- data?.integer(forKey: "totalMemories")+ var totalAlbums =+ data?.integer(forKey: "totalAlbums")- if totalMemories != nil && totalMemories! > 0 {- let count = totalMemories! > 5 ? 5 : totalMemories+ if totalAlbums != nil && totalAlbums! > 0 {+ let count = totalAlbums! > 5 ? 5 : totalAlbumsfor offset in 0..<count! {- let randomInt = Int.random(in: 0..<totalMemories!)+ let randomInt = Int.random(in: 0..<totalAlbums!)let entryDate = Calendar.current.date(byAdding: .minute, value: minutes * offset, to: currentDate)!@@ -189,7 +189,7 @@ struct EnteAlbumWidgetEntryView: View {.aspectRatio(contentMode: .fit).padding(8)- Text("Your albums will appear here")+ Text("Go to Settings->General to customise the widget").font(.custom("Inter", size: 14, relativeTo: .caption)).foregroundStyle(.white) // Tint-aware color.multilineTextAlignment(.center)diff --git a/mobile/ios/EnteMemoryWidget/EnteMemoryWidget.swift b/mobile/ios/EnteMemoryWidget/EnteMemoryWidget.swiftindex 22071159ea..6888e53da7 100644--- a/mobile/ios/EnteMemoryWidget/EnteMemoryWidget.swift+++ b/mobile/ios/EnteMemoryWidget/EnteMemoryWidget.swift@@ -190,7 +190,7 @@ struct EnteMemoryWidgetEntryView: View {.aspectRatio(contentMode: .fit).padding(8)- Text("Your memories will appear here")+ Text("Go to Settings->General to customise the widget").font(.custom("Inter", size: 14, relativeTo: .caption)).foregroundStyle(.white) // Tint-aware color.multilineTextAlignment(.center)diff --git a/mobile/ios/EntePeopleWidget/EntePeopleWidget.swift b/mobile/ios/EntePeopleWidget/EntePeopleWidget.swiftindex f8621a7cb2..857e9cf8df 100644--- a/mobile/ios/EntePeopleWidget/EntePeopleWidget.swift+++ b/mobile/ios/EntePeopleWidget/EntePeopleWidget.swift@@ -39,13 +39,13 @@ struct Provider: TimelineProvider {direction: .backward)!- var totalMemories =- data?.integer(forKey: "totalMemories")+ var totalPeople =+ data?.integer(forKey: "totalPeople")- if totalMemories != nil && totalMemories! > 0 {- let count = totalMemories! > 5 ? 5 : totalMemories+ if totalPeople != nil && totalPeople! > 0 {+ let count = totalPeople! > 5 ? 5 : totalPeoplefor offset in 0..<count! {- let randomInt = Int.random(in: 0..<totalMemories!)+ let randomInt = Int.random(in: 0..<totalPeople!)let entryDate = Calendar.current.date(byAdding: .minute, value: minutes * offset, to: currentDate)!@@ -189,7 +189,7 @@ struct EntePeopleWidgetEntryView: View {.aspectRatio(contentMode: .fit).padding(8)- Text("See People you wish to appear here")+ Text("Go to Settings->General to customise the widget").font(.custom("Inter", size: 14, relativeTo: .caption)).foregroundStyle(.white) // Tint-aware color.multilineTextAlignment(.center)