Skip to content

Commit fa137db

Browse files
authored
Merge pull request #4195 from owncloud/release/4.1.1
[RELEASE] 4.1.1
2 parents 3a0ceff + b62b702 commit fa137db

File tree

23 files changed

+85
-367
lines changed

23 files changed

+85
-367
lines changed

CHANGELOG.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Changelog for ownCloud Android Client [unreleased] (UNRELEASED)
33
The following sections list the changes in ownCloud Android Client unreleased relevant to
44
ownCloud admins and users.
55

6-
[unreleased]: https://github.com/owncloud/android/compare/v4.1.0...master
6+
[unreleased]: https://github.com/owncloud/android/compare/v4.1.1...master
77

88
Summary
99
-------
@@ -66,6 +66,37 @@ Details
6666

6767
https://github.com/owncloud/android/pull/4179
6868

69+
Changelog for ownCloud Android Client [4.1.1] (2023-10-18)
70+
=======================================
71+
The following sections list the changes in ownCloud Android Client 4.1.1 relevant to
72+
ownCloud admins and users.
73+
74+
[4.1.1]: https://github.com/owncloud/android/compare/v4.1.0...v4.1.1
75+
76+
Summary
77+
-------
78+
79+
* Bugfix - Some Null Pointer Exceptions avoided: [#4158](https://github.com/owncloud/android/issues/4158)
80+
* Bugfix - Thumbnails correctly shown for every user: [#4189](https://github.com/owncloud/android/pull/4189)
81+
82+
Details
83+
-------
84+
85+
* Bugfix - Some Null Pointer Exceptions avoided: [#4158](https://github.com/owncloud/android/issues/4158)
86+
87+
In the detail screen, in the main file list ViewModel and in the OCFile repository the app has
88+
been prevented from crashing when a null is found.
89+
90+
https://github.com/owncloud/android/issues/4158
91+
https://github.com/owncloud/android/pull/4170
92+
93+
* Bugfix - Thumbnails correctly shown for every user: [#4189](https://github.com/owncloud/android/pull/4189)
94+
95+
Due to an error in the request, users that included the '@' character in their usernames
96+
couldn't see the thumbnails of the image files. Now, every user can see them correctly.
97+
98+
https://github.com/owncloud/android/pull/4189
99+
69100
Changelog for ownCloud Android Client [4.1.0] (2023-08-23)
70101
=======================================
71102
The following sections list the changes in ownCloud Android Client 4.1.0 relevant to

changelog/4.1.1_2023-10-18/4170

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Some Null Pointer Exceptions avoided
2+
3+
in the detail screen, in the main file list ViewModel and in the OCFile repository the app has been prevented from crashing when a null is found.
4+
5+
https://github.com/owncloud/android/issues/4158
6+
https://github.com/owncloud/android/pull/4170

changelog/4.1.1_2023-10-18/4189

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Bugfix: Thumbnails correctly shown for every user
2+
3+
Due to an error in the request, users that included the '@' character in their usernames couldn't
4+
see the thumbnails of the image files. Now, every user can see them correctly.
5+
6+
https://github.com/owncloud/android/pull/4189

owncloudApp/build.gradle

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,8 @@ android {
9393

9494
testInstrumentationRunner "com.owncloud.android.utils.OCTestAndroidJUnitRunner"
9595

96-
versionCode = 41000000
97-
versionName = "4.1.0"
96+
versionCode = 41000100
97+
versionName = "4.1.1"
9898

9999
buildConfigField "String", gitRemote, "\"" + getGitOriginRemote() + "\""
100100
buildConfigField "String", commitSHA1, "\"" + getLatestGitHash() + "\""
@@ -161,6 +161,11 @@ android {
161161
}
162162

163163
testOptions {
164+
packagingOptions {
165+
jniLibs {
166+
useLegacyPackaging = true
167+
}
168+
}
164169
unitTests.returnDefaultValues = true
165170
animationsDisabled = true
166171
}

owncloudApp/src/androidTest/java/com/owncloud/android/ui/activity/ReleaseNotesActivityTest.kt

Lines changed: 2 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,13 @@ import android.content.Intent
2525
import androidx.test.core.app.ActivityScenario
2626
import androidx.test.core.app.ApplicationProvider
2727
import com.owncloud.android.R
28-
import com.owncloud.android.presentation.releasenotes.ReleaseNote
29-
import com.owncloud.android.presentation.releasenotes.ReleaseNoteType
3028
import com.owncloud.android.presentation.releasenotes.ReleaseNotesActivity
3129
import com.owncloud.android.presentation.releasenotes.ReleaseNotesViewModel
3230
import com.owncloud.android.utils.click
3331
import com.owncloud.android.utils.matchers.assertChildCount
3432
import com.owncloud.android.utils.matchers.isDisplayed
3533
import com.owncloud.android.utils.matchers.withText
34+
import com.owncloud.android.utils.releaseNotesList
3635
import io.mockk.every
3736
import io.mockk.mockk
3837
import org.junit.Assert.assertEquals
@@ -49,23 +48,6 @@ class ReleaseNotesActivityTest {
4948

5049
private lateinit var releaseNotesViewModel: ReleaseNotesViewModel
5150

52-
private val releaseNotesList = listOf(
53-
ReleaseNote(
54-
title = R.string.release_notes_4_1_title_1,
55-
subtitle = R.string.release_notes_4_1_subtitle_1,
56-
type = ReleaseNoteType.ENHANCEMENT,
57-
),
58-
ReleaseNote(
59-
title = R.string.release_notes_4_1_title_2,
60-
subtitle = R.string.release_notes_4_1_subtitle_2,
61-
type = ReleaseNoteType.ENHANCEMENT,
62-
),
63-
ReleaseNote(
64-
title = R.string.release_notes_4_1_title_3,
65-
subtitle = R.string.release_notes_4_1_subtitle_3,
66-
type = ReleaseNoteType.ENHANCEMENT,
67-
),
68-
)
6951
@Before
7052
fun setUp() {
7153
context = ApplicationProvider.getApplicationContext()
@@ -127,6 +109,6 @@ class ReleaseNotesActivityTest {
127109

128110
@Test
129111
fun test_childCount() {
130-
R.id.releaseNotes.assertChildCount(releaseNotesList.size)
112+
R.id.releaseNotes.assertChildCount(3)
131113
}
132114
}

owncloudApp/src/androidTest/java/com/owncloud/android/utils/ReleaseNotesList.kt

Lines changed: 10 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -25,38 +25,18 @@ import com.owncloud.android.presentation.releasenotes.ReleaseNoteType
2525

2626
val releaseNotesList = listOf(
2727
ReleaseNote(
28-
title = R.string.release_notes_4_1_title_1,
29-
subtitle = R.string.release_notes_4_1_subtitle_1,
30-
type = ReleaseNoteType.ENHANCEMENT,
28+
title = R.string.release_notes_header,
29+
subtitle = R.string.release_notes_footer,
30+
type = ReleaseNoteType.BUGFIX
3131
),
3232
ReleaseNote(
33-
title = R.string.release_notes_4_1_title_2,
34-
subtitle = R.string.release_notes_4_1_subtitle_2,
35-
type = ReleaseNoteType.ENHANCEMENT,
33+
title = R.string.release_notes_header,
34+
subtitle = R.string.release_notes_footer,
35+
type = ReleaseNoteType.BUGFIX
3636
),
3737
ReleaseNote(
38-
title = R.string.release_notes_4_1_title_3,
39-
subtitle = R.string.release_notes_4_1_subtitle_3,
40-
type = ReleaseNoteType.ENHANCEMENT,
41-
),
42-
ReleaseNote(
43-
title = R.string.release_notes_4_1_title_4,
44-
subtitle = R.string.release_notes_4_1_subtitle_4,
45-
type = ReleaseNoteType.BUGFIX,
46-
),
47-
ReleaseNote(
48-
title = R.string.release_notes_4_1_title_5,
49-
subtitle = R.string.release_notes_4_1_subtitle_5,
50-
type = ReleaseNoteType.ENHANCEMENT,
51-
),
52-
ReleaseNote(
53-
title = R.string.release_notes_4_1_title_6,
54-
subtitle = R.string.release_notes_4_1_subtitle_6,
55-
type = ReleaseNoteType.ENHANCEMENT,
56-
),
57-
ReleaseNote(
58-
title = R.string.release_notes_4_1_title_7,
59-
subtitle = R.string.release_notes_4_1_subtitle_7,
60-
type = ReleaseNoteType.BUGFIX,
61-
),
38+
title = R.string.release_notes_header,
39+
subtitle = R.string.release_notes_footer,
40+
type = ReleaseNoteType.ENHANCEMENT
41+
)
6242
)

owncloudApp/src/main/java/com/owncloud/android/datamodel/ThumbnailsCacheManager.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
import com.owncloud.android.lib.common.OwnCloudAccount;
4545
import com.owncloud.android.lib.common.OwnCloudClient;
4646
import com.owncloud.android.lib.common.SingleSessionManager;
47+
import com.owncloud.android.lib.common.accounts.AccountUtils;
4748
import com.owncloud.android.lib.common.http.HttpConstants;
4849
import com.owncloud.android.lib.common.http.methods.nonwebdav.GetMethod;
4950
import com.owncloud.android.ui.adapter.DiskLruImageCache;
@@ -259,7 +260,7 @@ private int getThumbnailDimension() {
259260
}
260261

261262
private String getPreviewUrl(OCFile ocFile, Account account) {
262-
String baseUrl = mClient.getBaseUri() + "/remote.php/dav/files/" + account.name.split("@")[0];
263+
String baseUrl = mClient.getBaseUri() + "/remote.php/dav/files/" + AccountUtils.getUserId(account, MainApp.Companion.getAppContext());
263264

264265
if (ocFile.getSpaceId() != null) {
265266
Lazy<GetWebDavUrlForSpaceUseCase> getWebDavUrlForSpaceUseCaseLazy = inject(GetWebDavUrlForSpaceUseCase.class);

owncloudApp/src/main/java/com/owncloud/android/presentation/files/details/FileDetailsFragment.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -309,23 +309,23 @@ class FileDetailsFragment : FileFragment() {
309309
}
310310

311311
private fun setLastSync(ocFile: OCFile) {
312-
if (ocFile.lastSyncDateForData!! > ZERO_MILLISECOND_TIME) {
312+
if (ocFile.lastSyncDateForData?.let { it > ZERO_MILLISECOND_TIME } == true) {
313313
binding.fdLastSync.visibility = View.VISIBLE
314314
binding.fdLastSyncLabel.visibility = View.VISIBLE
315315
binding.fdLastSync.text = DisplayUtils.unixTimeToHumanReadable(ocFile.lastSyncDateForData!!)
316316
}
317317
}
318318

319319
private fun setModified(ocFile: OCFile) {
320-
if (ocFile.modificationTimestamp!! > ZERO_MILLISECOND_TIME) {
320+
if (ocFile.modificationTimestamp?.let { it > ZERO_MILLISECOND_TIME } == true) {
321321
binding.fdModified.visibility = View.VISIBLE
322322
binding.fdModifiedLabel.visibility = View.VISIBLE
323-
binding.fdModified.text = DisplayUtils.unixTimeToHumanReadable(ocFile.modificationTimestamp!!)
323+
binding.fdModified.text = DisplayUtils.unixTimeToHumanReadable(ocFile.modificationTimestamp)
324324
}
325325
}
326326

327327
private fun setCreated(ocFile: OCFile) {
328-
if (ocFile.creationTimestamp!! > ZERO_MILLISECOND_TIME) {
328+
if (ocFile.creationTimestamp?.let { it > ZERO_MILLISECOND_TIME } == true) {
329329
binding.fdCreated.visibility = View.VISIBLE
330330
binding.fdCreatedLabel.visibility = View.VISIBLE
331331
binding.fdCreated.text = DisplayUtils.unixTimeToHumanReadable(ocFile.creationTimestamp!!)

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ class MainFileListViewModel(
256256
TODO()
257257
}
258258

259-
updateFolderToDisplay(parentDir!!)
259+
parentDir?.let { updateFolderToDisplay(it) }
260260
}
261261
}
262262

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

Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -46,43 +46,13 @@ class ReleaseNotesViewModel(
4646
companion object {
4747
val releaseNotesList = listOf(
4848
ReleaseNote(
49-
title = R.string.release_notes_4_1_title_1,
50-
subtitle = R.string.release_notes_4_1_subtitle_1,
51-
type = ReleaseNoteType.ENHANCEMENT,
52-
),
53-
ReleaseNote(
54-
title = R.string.release_notes_4_1_title_2,
55-
subtitle = R.string.release_notes_4_1_subtitle_2,
56-
type = ReleaseNoteType.ENHANCEMENT,
57-
),
58-
ReleaseNote(
59-
title = R.string.release_notes_4_1_title_3,
60-
subtitle = R.string.release_notes_4_1_subtitle_3,
61-
type = ReleaseNoteType.ENHANCEMENT,
62-
),
63-
ReleaseNote(
64-
title = R.string.release_notes_4_1_title_4,
65-
subtitle = R.string.release_notes_4_1_subtitle_4,
49+
title = R.string.release_notes_4_1_1_title_1,
50+
subtitle = R.string.release_notes_4_1_1_subtitle_1,
6651
type = ReleaseNoteType.BUGFIX,
6752
),
6853
ReleaseNote(
69-
title = R.string.release_notes_4_1_title_5,
70-
subtitle = R.string.release_notes_4_1_subtitle_5,
71-
type = ReleaseNoteType.ENHANCEMENT,
72-
),
73-
ReleaseNote(
74-
title = R.string.release_notes_4_1_title_6,
75-
subtitle = R.string.release_notes_4_1_subtitle_6,
76-
type = ReleaseNoteType.ENHANCEMENT,
77-
),
78-
ReleaseNote(
79-
title = R.string.release_notes_4_1_title_8,
80-
subtitle = R.string.release_notes_4_1_subtitle_8,
81-
type = ReleaseNoteType.CHANGE,
82-
),
83-
ReleaseNote(
84-
title = R.string.release_notes_4_1_title_7,
85-
subtitle = R.string.release_notes_4_1_subtitle_7,
54+
title = R.string.release_notes_4_1_1_title_2,
55+
subtitle = R.string.release_notes_4_1_1_subtitle_2,
8656
type = ReleaseNoteType.BUGFIX,
8757
),
8858
)

0 commit comments

Comments
 (0)