-
Notifications
You must be signed in to change notification settings - Fork 3.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4334 from owncloud/feature/manual_removal_local_s…
…torage [FEATURE REQUEST] Manual removal of local storage
- Loading branch information
Showing
19 changed files
with
237 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
Enhancement: New setting for manual removal of local storage | ||
|
||
A new icon has been added in Manage Accounts view to delete manually local files. | ||
|
||
https://github.com/owncloud/android/issues/4174 | ||
https://github.com/owncloud/android/pull/4334 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...pp/src/main/java/com/owncloud/android/usecases/files/RemoveLocalFilesForAccountUseCase.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
/** | ||
* ownCloud Android client application | ||
* | ||
* @author Aitor Ballesteros Pavón | ||
* | ||
* Copyright (C) 2024 ownCloud GmbH. | ||
* | ||
* This program is free software: you can redistribute it and/or modify | ||
* it under the terms of the GNU General Public License version 2, | ||
* as published by the Free Software Foundation. | ||
* | ||
* This program is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
* GNU General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU General Public License | ||
* along with this program. If not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
package com.owncloud.android.usecases.files | ||
|
||
import com.owncloud.android.domain.BaseUseCaseWithResult | ||
import com.owncloud.android.domain.files.FileRepository | ||
import com.owncloud.android.domain.files.usecases.RemoveFileUseCase | ||
|
||
class RemoveLocalFilesForAccountUseCase( | ||
private val fileRepository: FileRepository, | ||
private val removeFileUseCase: RemoveFileUseCase, | ||
) : BaseUseCaseWithResult<Unit, RemoveLocalFilesForAccountUseCase.Params>() { | ||
|
||
override fun run(params: Params) { | ||
val listOfFilesToDelete = fileRepository.getDownloadedFilesForAccount(params.owner) | ||
if (listOfFilesToDelete.isNotEmpty()) { | ||
removeFileUseCase(RemoveFileUseCase.Params(listOfFilesToDelete, true)) | ||
} | ||
} | ||
|
||
data class Params( | ||
val owner: String, | ||
) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<vector xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:width="24dp" | ||
android:height="24dp" | ||
android:viewportWidth="960" | ||
android:viewportHeight="960" | ||
android:tint="?attr/colorControlNormal"> | ||
<path | ||
android:fillColor="@android:color/white" | ||
android:pathData="M440,440L520,440L520,160Q520,143 508.5,131.5Q497,120 480,120Q463,120 451.5,131.5Q440,143 440,160L440,440ZM200,600L760,600L760,520Q760,520 760,520Q760,520 760,520L200,520Q200,520 200,520Q200,520 200,520L200,600ZM142,840L240,840L240,760Q240,743 251.5,731.5Q263,720 280,720Q297,720 308.5,731.5Q320,743 320,760L320,840L440,840L440,760Q440,743 451.5,731.5Q463,720 480,720Q497,720 508.5,731.5Q520,743 520,760L520,840L640,840L640,760Q640,743 651.5,731.5Q663,720 680,720Q697,720 708.5,731.5Q720,743 720,760L720,840L818,840Q818,840 818,840Q818,840 818,840L778,680L182,680L142,840Q142,840 142,840Q142,840 142,840ZM818,920L142,920Q103,920 79,889Q55,858 65,820L120,600L120,520Q120,487 143.5,463.5Q167,440 200,440L360,440L360,160Q360,110 395,75Q430,40 480,40Q530,40 565,75Q600,110 600,160L600,440L760,440Q793,440 816.5,463.5Q840,487 840,520L840,600L895,820Q908,858 883.5,889Q859,920 818,920ZM760,520L200,520L200,520Q200,520 200,520Q200,520 200,520L760,520Q760,520 760,520Q760,520 760,520L760,520ZM520,440L440,440L440,440Q440,440 451.5,440Q463,440 480,440Q497,440 508.5,440Q520,440 520,440L520,440Z" /> | ||
</vector> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.