Skip to content

Commit af0e67a

Browse files
tobiasKaminskyAndyScherzinger
authored andcommitted
wip
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
1 parent b2bedbf commit af0e67a

57 files changed

Lines changed: 166 additions & 8 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/src/androidTest/java/com/nextcloud/test/GrantStoragePermissionRule.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ class GrantStoragePermissionRule private constructor() {
2727
Build.VERSION.SDK_INT < Build.VERSION_CODES.R -> GrantPermissionRule.grant(
2828
Manifest.permission.WRITE_EXTERNAL_STORAGE
2929
)
30+
3031
else -> GrantManageExternalStoragePermissionRule()
3132
}
3233
}

app/src/androidTest/java/com/owncloud/android/files/services/FileUploaderIT.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,9 @@ abstract class FileUploaderIT : AbstractOnServerIT() {
5757
uploadsStorageManager = UploadsStorageManager(accountManager, contentResolver)
5858
}
5959

60-
/**
61-
* uploads a file, overwrites it with an empty one, check if overwritten
62-
*/
60+
// /**
61+
// * uploads a file, overwrites it with an empty one, check if overwritten
62+
// */
6363
// disabled, flaky test
6464
// @Test
6565
// fun testKeepLocalAndOverwriteRemote() {

app/src/androidTest/java/com/owncloud/android/ui/trashbin/TrashbinLocalRepository.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ class TrashbinLocalRepository(private val testCase: TrashbinActivityIT.TestCase)
2828
override fun getFolder(remotePath: String?, callback: LoadFolderCallback?) {
2929
when (testCase) {
3030
TrashbinActivityIT.TestCase.ERROR -> callback?.onError(R.string.trashbin_loading_failed)
31+
3132
TrashbinActivityIT.TestCase.FILES -> {
3233
val files = ArrayList<TrashbinFile>()
3334
files.add(
@@ -69,6 +70,7 @@ class TrashbinLocalRepository(private val testCase: TrashbinActivityIT.TestCase)
6970

7071
callback?.onSuccess(files)
7172
}
73+
7274
TrashbinActivityIT.TestCase.EMPTY -> callback?.onSuccess(ArrayList<TrashbinFile>())
7375
}
7476
}

app/src/main/java/com/nextcloud/client/assistant/extensions/TaskExtensions.kt

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
package com.nextcloud.client.assistant.extensions
1111

1212
import android.content.Context
13-
import androidx.compose.ui.res.stringResource
1413
import com.nextcloud.utils.date.DateFormatPattern
1514
import com.nextcloud.utils.date.DateFormatter
1615
import com.owncloud.android.R
@@ -58,18 +57,23 @@ private fun Task.getStatusIconV1(): Int = when (status) {
5857
"0" -> {
5958
R.drawable.ic_unknown
6059
}
60+
6161
"1" -> {
6262
R.drawable.ic_clock
6363
}
64+
6465
"2" -> {
6566
R.drawable.ic_modification_desc
6667
}
68+
6769
"3" -> {
6870
R.drawable.ic_check_circle_outline
6971
}
72+
7073
"4" -> {
7174
R.drawable.image_fail
7275
}
76+
7377
else -> {
7478
R.drawable.ic_unknown
7579
}
@@ -79,18 +83,23 @@ private fun Task.getStatusIconDescriptionV1(): Int = when (status) {
7983
"0" -> {
8084
R.string.assistant_task_status_unknown
8185
}
86+
8287
"1" -> {
8388
R.string.assistant_task_status_scheduled
8489
}
90+
8591
"2" -> {
8692
R.string.assistant_task_status_running
8793
}
94+
8895
"3" -> {
8996
R.string.assistant_task_status_successful
9097
}
98+
9199
"4" -> {
92100
R.string.assistant_task_status_failed
93101
}
102+
94103
else -> {
95104
R.string.assistant_task_status_unknown
96105
}
@@ -100,18 +109,23 @@ private fun Task.getStatusIconV2(): Int = when (status) {
100109
"STATUS_UNKNOWN" -> {
101110
R.drawable.ic_unknown
102111
}
112+
103113
"STATUS_SCHEDULED" -> {
104114
R.drawable.ic_clock
105115
}
116+
106117
"STATUS_RUNNING" -> {
107118
R.drawable.ic_modification_desc
108119
}
120+
109121
"STATUS_SUCCESSFUL" -> {
110122
R.drawable.ic_check_circle_outline
111123
}
124+
112125
"STATUS_FAILED" -> {
113126
R.drawable.image_fail
114127
}
128+
115129
else -> {
116130
R.drawable.ic_unknown
117131
}
@@ -121,18 +135,23 @@ private fun Task.getStatusIconDescriptionV2(): Int = when (status) {
121135
"STATUS_UNKNOWN" -> {
122136
R.string.assistant_task_status_unknown
123137
}
138+
124139
"STATUS_SCHEDULED" -> {
125140
R.string.assistant_task_status_scheduled
126141
}
142+
127143
"STATUS_RUNNING" -> {
128144
R.string.assistant_task_status_running
129145
}
146+
130147
"STATUS_SUCCESSFUL" -> {
131148
R.string.assistant_task_status_successful
132149
}
150+
133151
"STATUS_FAILED" -> {
134152
R.string.assistant_task_status_failed
135153
}
154+
136155
else -> {
137156
R.string.assistant_task_status_unknown
138157
}

app/src/main/java/com/nextcloud/client/documentscan/DocumentScanActivity.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,10 +103,12 @@ class DocumentScanActivity :
103103
viewModel.onClickDone()
104104
true
105105
}
106+
106107
android.R.id.home -> {
107108
onBackPressedDispatcher.onBackPressed()
108109
true
109110
}
111+
110112
else -> false
111113
}
112114
}
@@ -129,6 +131,7 @@ class DocumentScanActivity :
129131
startPageScan()
130132
}
131133
}
134+
132135
is DocumentScanViewModel.UIState.RequestExportState -> {
133136
updateButtonsEnabled(false)
134137
if (state.shouldRequestExportType) {
@@ -137,6 +140,7 @@ class DocumentScanActivity :
137140
}
138141
}
139142
}
143+
140144
DocumentScanViewModel.UIState.DoneState, DocumentScanViewModel.UIState.CanceledState -> {
141145
finish()
142146
}

app/src/main/java/com/nextcloud/client/documentscan/DocumentScanViewModel.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,7 @@ class DocumentScanViewModel @Inject constructor(
138138
ExportType.PDF -> {
139139
exportToPdf(state.pageList)
140140
}
141+
141142
ExportType.IMAGES -> {
142143
exportToImages(state.pageList)
143144
}

app/src/main/java/com/nextcloud/client/editimage/EditImageActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -174,6 +174,7 @@ class EditImageActivity :
174174
// determine output file format
175175
format = when (file.mimeType) {
176176
MimeType.PNG -> Bitmap.CompressFormat.PNG
177+
177178
MimeType.WEBP -> {
178179
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.R) {
179180
Bitmap.CompressFormat.WEBP_LOSSY

app/src/main/java/com/nextcloud/client/errorhandling/ShowErrorActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ class ShowErrorActivity : AppCompatActivity() {
6363
onClickedShare()
6464
true
6565
}
66+
6667
else -> super.onOptionsItemSelected(item)
6768
}
6869

app/src/main/java/com/nextcloud/client/etm/EtmActivity.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ class EtmActivity :
5757
}
5858
true
5959
}
60+
6061
else -> super.onOptionsItemSelected(item)
6162
}
6263

app/src/main/java/com/nextcloud/client/etm/pages/EtmAccountsFragment.kt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ class EtmAccountsFragment : EtmBaseFragment() {
5555
onClickedShare()
5656
true
5757
}
58+
5859
else -> super.onOptionsItemSelected(item)
5960
}
6061

0 commit comments

Comments
 (0)