You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: feature/account/avatar/impl/src/main/kotlin/net/thunderbird/feature/account/avatar/data/datasource/LocalAvatarImageDataSource.kt
Copy file name to clipboardExpand all lines: feature/account/avatar/impl/src/main/kotlin/net/thunderbird/feature/account/avatar/di/FeatureAccountAvatarModule.kt
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -11,6 +11,7 @@ val featureAccountAvatarModule = module {
Copy file name to clipboardExpand all lines: feature/account/avatar/impl/src/test/kotlin/net/thunderbird/feature/account/avatar/data/datasource/LocalAvatarImageDataSourceTest.kt
Copy file name to clipboardExpand all lines: feature/account/settings/impl/src/main/kotlin/net/thunderbird/feature/account/settings/impl/domain/usecase/UpdateAvatarImage.kt
+3-2Lines changed: 3 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -22,10 +22,11 @@ internal class UpdateAvatarImage(
22
22
): Outcome<Avatar.Image, AccountSettingError> {
23
23
val mimeType = mimeTypeResolver.getMimeType(imageUri)
24
24
25
-
if (mimeType ==null|| mimeType !=MimeType.JPEG) {
25
+
// Check for both JPEG and PNG
26
+
if (mimeType ==null|| (mimeType !=MimeType.JPEG&& mimeType !=MimeType.PNG)) {
26
27
returnOutcome.Failure(
27
28
AccountSettingError.UnsupportedFormat(
28
-
message ="Only JPEG images are supported. Found: ${mimeType ?:"unknown"}",
29
+
message ="Only JPEG and PNG images are supported. Found: ${mimeType ?:"unknown"}",
Copy file name to clipboardExpand all lines: feature/account/settings/impl/src/main/kotlin/net/thunderbird/feature/account/settings/impl/ui/general/GeneralSettingsScreen.kt
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,7 @@ internal fun GeneralSettingsScreen(
25
25
provider:SettingViewProvider = koinInject(),
26
26
builder:SettingsBuilder = koinInject(),
27
27
) {
28
-
val imagePicker = rememberLauncherForActivityResult(ActivityResultContracts.GetContent()) { uri ->
28
+
val imagePicker = rememberLauncherForActivityResult(ActivityResultContracts.OpenDocument()) { uri ->
0 commit comments