Skip to content

Commit 8cecf7b

Browse files
authored
Merge pull request #4562 from owncloud/fix/confusing_behaviour_with_apps_provider
[FIX] Confusing behaviour when creating new files using apps provider
2 parents 2b349dc + ad13fb0 commit 8cecf7b

File tree

8 files changed

+42
-2
lines changed

8 files changed

+42
-2
lines changed

CHANGELOG.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Table of Contents
22

3+
* [Changelog for unreleased](#changelog-for-owncloud-android-client-unreleased-unreleased)
34
* [Changelog for 4.5.0](#changelog-for-owncloud-android-client-450-2025-03-24)
45
* [Changelog for 4.4.1](#changelog-for-owncloud-android-client-441-2024-10-30)
56
* [Changelog for 4.4.0](#changelog-for-owncloud-android-client-440-2024-09-30)
@@ -25,6 +26,27 @@
2526
* [Changelog for 2.18.1](#changelog-for-owncloud-android-client-2181-2021-07-20)
2627
* [Changelog for 2.18.0](#changelog-for-owncloud-android-client-2180-2021-05-24)
2728
* [Changelog for 2.17 versions and below](#changelog-for-217-versions-and-below)
29+
# Changelog for ownCloud Android Client [unreleased] (UNRELEASED)
30+
31+
The following sections list the changes in ownCloud Android Client unreleased relevant to
32+
ownCloud admins and users.
33+
34+
[unreleased]: https://github.com/owncloud/android/compare/v4.5.0...master
35+
36+
## Summary
37+
38+
* Bugfix - Confusing behaviour when creating new files using apps provider: [#4560](https://github.com/owncloud/android/issues/4560)
39+
40+
## Details
41+
42+
* Bugfix - Confusing behaviour when creating new files using apps provider: [#4560](https://github.com/owncloud/android/issues/4560)
43+
44+
The error that appeared when creating a new file using the apps provider has
45+
been fixed. Now, the custom tab is opened correctly with the file content.
46+
47+
https://github.com/owncloud/android/issues/4560
48+
https://github.com/owncloud/android/pull/4562
49+
2850
# Changelog for ownCloud Android Client [4.5.0] (2025-03-24)
2951

3052
The following sections list the changes in ownCloud Android Client 4.5.0 relevant to

changelog/unreleased/4562

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Bugfix: Confusing behaviour when creating new files using apps provider
2+
3+
The error that appeared when creating a new file using the apps provider has been fixed.
4+
Now, the custom tab is opened correctly with the file content.
5+
6+
https://github.com/owncloud/android/issues/4560
7+
https://github.com/owncloud/android/pull/4562

owncloudApp/src/main/java/com/owncloud/android/presentation/files/filelist/MainFileListFragment.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1167,7 +1167,8 @@ class MainFileListFragment : Fragment(),
11671167
}
11681168
setOnClickListener {
11691169
showFilenameTextDialog(appRegistry.ext)
1170-
currentDefaultApplication = appRegistry.defaultApplication
1170+
currentDefaultApplication = appRegistry.appProviders.find { it.productName == appRegistry.defaultApplication}?.name
1171+
?: appRegistry.defaultApplication
11711172
dialog.hide()
11721173
}
11731174
}

owncloudApp/src/main/java/com/owncloud/android/presentation/releasenotes/ReleaseNotesViewModel.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,11 @@ class ReleaseNotesViewModel(
6363
subtitle = R.string.release_notes_4_5_0_subtitle_feedback_in_previews,
6464
type = ReleaseNoteType.ENHANCEMENT
6565
),
66+
ReleaseNote(
67+
title = R.string.release_notes_4_5_1_title_strange_behaviour_apps_provider,
68+
subtitle = R.string.release_notes_4_5_1_subtitle_strange_behaviour_apps_provider,
69+
type = ReleaseNoteType.BUGFIX
70+
),
6671
ReleaseNote(
6772
title = R.string.release_notes_bugfixes_title,
6873
subtitle = R.string.release_notes_bugfixes_subtitle,

owncloudApp/src/main/res/values/strings.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -742,7 +742,8 @@
742742
<string name="release_notes_4_5_0_subtitle_quota_improvements">Storage occupation refreshed frequently in file and refresh operations and available in accounts manager view, besides of drawer menu</string>
743743
<string name="release_notes_4_5_0_title_light_users">Infinite Scale Users Light</string>
744744
<string name="release_notes_4_5_0_subtitle_light_users">Infinite Scale Users Light (users without personal space) are now supported in the app</string>
745-
745+
<string name="release_notes_4_5_1_title_strange_behaviour_apps_provider">Fix for files creation via app providers</string>
746+
<string name="release_notes_4_5_1_subtitle_strange_behaviour_apps_provider">Files are now opened correctly when they are created using app providers</string>
746747

747748
<!-- Open in web -->
748749
<string name="ic_action_open_in_web">Open in web</string>

owncloudComLibrary/src/main/java/com/owncloud/android/lib/resources/appregistry/responses/AppRegistryResponse.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,5 +52,7 @@ data class AppRegistryMimeTypeResponse(
5252
@JsonClass(generateAdapter = true)
5353
data class AppRegistryProviderResponse(
5454
val name: String,
55+
@Json(name = "product_name")
56+
val productName: String,
5557
val icon: String,
5658
)

owncloudData/src/main/java/com/owncloud/android/data/appregistry/datasources/implementation/OCRemoteAppRegistryDataSource.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ class OCRemoteAppRegistryDataSource(
7575
appProviders = appRegistryMimeTypeResponse.appProviders.map { appRegistryProviderResponse ->
7676
AppRegistryProvider(
7777
name = appRegistryProviderResponse.name,
78+
productName = appRegistryProviderResponse.productName,
7879
icon = appRegistryProviderResponse.icon
7980
)
8081
},

owncloudDomain/src/main/java/com/owncloud/android/domain/appregistry/model/AppRegistry.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,6 @@ data class AppRegistryMimeType(
3636

3737
data class AppRegistryProvider(
3838
val name: String,
39+
val productName: String = "",
3940
val icon: String,
4041
)

0 commit comments

Comments
 (0)