Skip to content

Commit

Permalink
Merge pull request #4492 from owncloud/feature/change_auto_uploads_name
Browse files Browse the repository at this point in the history
[FEATURE REQUEST] Replace "auto-uploads" with "automatic uploads"
  • Loading branch information
jesmrec authored Oct 9, 2024
2 parents 121d1bc + 58019f7 commit 5350049
Show file tree
Hide file tree
Showing 73 changed files with 185 additions and 206 deletions.
22 changes: 22 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
# Table of Contents

* [Changelog for unreleased](#changelog-for-owncloud-android-client-unreleased-unreleased)
* [Changelog for 4.4.0](#changelog-for-owncloud-android-client-440-2024-09-30)
* [Changelog for 4.3.1](#changelog-for-owncloud-android-client-431-2024-07-22)
* [Changelog for 4.3.0](#changelog-for-owncloud-android-client-430-2024-07-01)
Expand All @@ -23,6 +24,27 @@
* [Changelog for 2.18.1](#changelog-for-owncloud-android-client-2181-2021-07-20)
* [Changelog for 2.18.0](#changelog-for-owncloud-android-client-2180-2021-05-24)
* [Changelog for 2.17 versions and below](#changelog-for-217-versions-and-below)
# Changelog for ownCloud Android Client [unreleased] (UNRELEASED)

The following sections list the changes in ownCloud Android Client unreleased relevant to
ownCloud admins and users.

[unreleased]: https://github.com/owncloud/android/compare/v4.4.0...master

## Summary

* Change - Replace auto-uploads with automatic uploads: [#4252](https://github.com/owncloud/android/issues/4252)

## Details

* Change - Replace auto-uploads with automatic uploads: [#4252](https://github.com/owncloud/android/issues/4252)

Wording change in the feature name, in order to make it clearer in translations
and documentation

https://github.com/owncloud/android/issues/4252
https://github.com/owncloud/android/pull/4492

# Changelog for ownCloud Android Client [4.4.0] (2024-09-30)

The following sections list the changes in ownCloud Android Client 4.4.0 relevant to
Expand Down
6 changes: 6 additions & 0 deletions changelog/unreleased/4492
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Change: replace auto-uploads with automatic uploads

Wording change in the feature name, in order to make it clearer in translations and documentation

https://github.com/owncloud/android/issues/4252
https://github.com/owncloud/android/pull/4492
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import com.owncloud.android.data.webfinger.repository.OCWebFingerRepository
import com.owncloud.android.domain.appregistry.AppRegistryRepository
import com.owncloud.android.domain.authentication.AuthenticationRepository
import com.owncloud.android.domain.authentication.oauth.OAuthRepository
import com.owncloud.android.domain.camerauploads.FolderBackupRepository
import com.owncloud.android.domain.automaticuploads.FolderBackupRepository
import com.owncloud.android.domain.capabilities.CapabilityRepository
import com.owncloud.android.domain.files.FileRepository
import com.owncloud.android.domain.server.ServerInfoRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ import com.owncloud.android.domain.availableoffline.usecases.GetFilesAvailableOf
import com.owncloud.android.domain.availableoffline.usecases.GetFilesAvailableOfflineFromEveryAccountUseCase
import com.owncloud.android.domain.availableoffline.usecases.SetFilesAsAvailableOfflineUseCase
import com.owncloud.android.domain.availableoffline.usecases.UnsetFilesAsAvailableOfflineUseCase
import com.owncloud.android.domain.camerauploads.usecases.GetCameraUploadsConfigurationUseCase
import com.owncloud.android.domain.camerauploads.usecases.GetPictureUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.camerauploads.usecases.GetVideoUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.camerauploads.usecases.ResetPictureUploadsUseCase
import com.owncloud.android.domain.camerauploads.usecases.ResetVideoUploadsUseCase
import com.owncloud.android.domain.camerauploads.usecases.SavePictureUploadsConfigurationUseCase
import com.owncloud.android.domain.camerauploads.usecases.SaveVideoUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.usecases.GetAutomaticUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.usecases.GetPictureUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.automaticuploads.usecases.GetVideoUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.automaticuploads.usecases.ResetPictureUploadsUseCase
import com.owncloud.android.domain.automaticuploads.usecases.ResetVideoUploadsUseCase
import com.owncloud.android.domain.automaticuploads.usecases.SavePictureUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.usecases.SaveVideoUploadsConfigurationUseCase
import com.owncloud.android.domain.capabilities.usecases.GetCapabilitiesAsLiveDataUseCase
import com.owncloud.android.domain.capabilities.usecases.GetStoredCapabilitiesUseCase
import com.owncloud.android.domain.capabilities.usecases.RefreshCapabilitiesFromServerAsyncUseCase
Expand Down Expand Up @@ -261,7 +261,7 @@ val useCaseModule = module {
factoryOf(::GetServerInfoAsyncUseCase)

// Camera Uploads
factoryOf(::GetCameraUploadsConfigurationUseCase)
factoryOf(::GetAutomaticUploadsConfigurationUseCase)
factoryOf(::GetPictureUploadsConfigurationStreamUseCase)
factoryOf(::GetVideoUploadsConfigurationStreamUseCase)
factoryOf(::ResetPictureUploadsUseCase)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ import com.owncloud.android.presentation.security.passcode.PasscodeAction
import com.owncloud.android.presentation.security.pattern.PatternViewModel
import com.owncloud.android.presentation.settings.SettingsViewModel
import com.owncloud.android.presentation.settings.advanced.SettingsAdvancedViewModel
import com.owncloud.android.presentation.settings.autouploads.SettingsPictureUploadsViewModel
import com.owncloud.android.presentation.settings.autouploads.SettingsVideoUploadsViewModel
import com.owncloud.android.presentation.settings.automaticuploads.SettingsPictureUploadsViewModel
import com.owncloud.android.presentation.settings.automaticuploads.SettingsVideoUploadsViewModel
import com.owncloud.android.presentation.settings.logging.SettingsLogsViewModel
import com.owncloud.android.presentation.settings.more.SettingsMoreViewModel
import com.owncloud.android.presentation.settings.security.SettingsSecurityViewModel
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ class ManageAccountsDialogFragment : DialogFragment(), ManageAccountsAdapter.Acc

override fun removeAccount(account: Account) {
dialogView.isVisible = false
val hasAccountAttachedCameraUploads = manageAccountsViewModel.hasCameraUploadsAttached(account.name)
val hasAccountAttachedCameraUploads = manageAccountsViewModel.hasAutomaticUploadsAttached(account.name)
val dialog = AlertDialog.Builder(requireContext())
.setMessage(getString(
if (hasAccountAttachedCameraUploads) R.string.confirmation_remove_account_alert_camera_uploads
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ package com.owncloud.android.presentation.accounts
import android.accounts.Account
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.owncloud.android.domain.camerauploads.model.CameraUploadsConfiguration
import com.owncloud.android.domain.camerauploads.usecases.GetCameraUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.model.AutomaticUploadsConfiguration
import com.owncloud.android.domain.automaticuploads.usecases.GetAutomaticUploadsConfigurationUseCase
import com.owncloud.android.domain.utils.Event
import com.owncloud.android.extensions.ViewModelExt.runUseCaseWithResult
import com.owncloud.android.presentation.common.UIResult
Expand All @@ -40,18 +40,18 @@ import kotlinx.coroutines.launch
class ManageAccountsViewModel(
private val accountProvider: AccountProvider,
private val removeLocalFilesForAccountUseCase: RemoveLocalFilesForAccountUseCase,
private val getCameraUploadsConfigurationUseCase: GetCameraUploadsConfigurationUseCase,
private val getAutomaticUploadsConfigurationUseCase: GetAutomaticUploadsConfigurationUseCase,
private val coroutinesDispatcherProvider: CoroutinesDispatcherProvider,
) : ViewModel() {

private val _cleanAccountLocalStorageFlow = MutableStateFlow<Event<UIResult<Unit>>?>(null)
val cleanAccountLocalStorageFlow: StateFlow<Event<UIResult<Unit>>?> = _cleanAccountLocalStorageFlow

private var cameraUploadsConfiguration: CameraUploadsConfiguration? = null
private var automaticUploadsConfiguration: AutomaticUploadsConfiguration? = null

init {
viewModelScope.launch(coroutinesDispatcherProvider.io) {
cameraUploadsConfiguration = getCameraUploadsConfigurationUseCase(Unit).getDataOrNull()
automaticUploadsConfiguration = getAutomaticUploadsConfigurationUseCase(Unit).getDataOrNull()
}
}

Expand All @@ -73,8 +73,8 @@ class ManageAccountsViewModel(
)
}

fun hasCameraUploadsAttached(accountName: String): Boolean {
return accountName == cameraUploadsConfiguration?.pictureUploadsConfiguration?.accountName ||
accountName == cameraUploadsConfiguration?.videoUploadsConfiguration?.accountName
fun hasAutomaticUploadsAttached(accountName: String): Boolean {
return accountName == automaticUploadsConfiguration?.pictureUploadsConfiguration?.accountName ||
accountName == automaticUploadsConfiguration?.videoUploadsConfiguration?.accountName
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ import androidx.constraintlayout.widget.ConstraintLayout
import androidx.core.view.isVisible
import com.owncloud.android.R
import com.owncloud.android.presentation.settings.advanced.SettingsAdvancedFragment
import com.owncloud.android.presentation.settings.autouploads.SettingsPictureUploadsFragment
import com.owncloud.android.presentation.settings.autouploads.SettingsVideoUploadsFragment
import com.owncloud.android.presentation.settings.automaticuploads.SettingsPictureUploadsFragment
import com.owncloud.android.presentation.settings.automaticuploads.SettingsVideoUploadsFragment
import com.owncloud.android.presentation.settings.logging.SettingsLogsFragment
import com.owncloud.android.presentation.settings.more.SettingsMoreFragment
import com.owncloud.android.presentation.settings.security.SettingsSecurityFragment
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.owncloud.android.presentation.settings.autouploads
package com.owncloud.android.presentation.settings.automaticuploads

import android.app.Activity
import android.content.DialogInterface
Expand Down Expand Up @@ -47,7 +47,7 @@ import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_PICTURE_UPLOADS_LA
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_PICTURE_UPLOADS_PATH
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_PICTURE_UPLOADS_SOURCE
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_PICTURE_UPLOADS_WIFI_ONLY
import com.owncloud.android.domain.camerauploads.model.UploadBehavior
import com.owncloud.android.domain.automaticuploads.model.UploadBehavior
import com.owncloud.android.extensions.showAlertDialog
import com.owncloud.android.ui.activity.FolderPickerActivity
import com.owncloud.android.utils.DisplayUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.owncloud.android.presentation.settings.autouploads
package com.owncloud.android.presentation.settings.automaticuploads

import android.content.Intent
import android.net.Uri
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.owncloud.android.R
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_UPLOADS_DEFAULT_PATH
import com.owncloud.android.domain.camerauploads.model.FolderBackUpConfiguration
import com.owncloud.android.domain.camerauploads.model.FolderBackUpConfiguration.Companion.pictureUploadsName
import com.owncloud.android.domain.camerauploads.model.UploadBehavior
import com.owncloud.android.domain.camerauploads.usecases.GetPictureUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.camerauploads.usecases.ResetPictureUploadsUseCase
import com.owncloud.android.domain.camerauploads.usecases.SavePictureUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.model.FolderBackUpConfiguration
import com.owncloud.android.domain.automaticuploads.model.FolderBackUpConfiguration.Companion.pictureUploadsName
import com.owncloud.android.domain.automaticuploads.model.UploadBehavior
import com.owncloud.android.domain.automaticuploads.usecases.GetPictureUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.automaticuploads.usecases.ResetPictureUploadsUseCase
import com.owncloud.android.domain.automaticuploads.usecases.SavePictureUploadsConfigurationUseCase
import com.owncloud.android.domain.files.model.OCFile
import com.owncloud.android.domain.spaces.model.OCSpace
import com.owncloud.android.domain.spaces.usecases.GetPersonalSpaceForAccountUseCase
Expand Down Expand Up @@ -189,7 +189,7 @@ class SettingsPictureUploadsViewModel(
}

fun schedulePictureUploads() {
workManagerProvider.enqueueCameraUploadsWorker()
workManagerProvider.enqueueAutomaticUploadsWorker()
}

private fun composePictureUploadsConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.owncloud.android.presentation.settings.autouploads
package com.owncloud.android.presentation.settings.automaticuploads

import android.app.Activity
import android.content.DialogInterface
Expand Down Expand Up @@ -47,7 +47,7 @@ import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_VIDEO_UPLOADS_ENAB
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_VIDEO_UPLOADS_PATH
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_VIDEO_UPLOADS_SOURCE
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_VIDEO_UPLOADS_WIFI_ONLY
import com.owncloud.android.domain.camerauploads.model.UploadBehavior
import com.owncloud.android.domain.automaticuploads.model.UploadBehavior
import com.owncloud.android.extensions.showAlertDialog
import com.owncloud.android.ui.activity.FolderPickerActivity
import com.owncloud.android.utils.DisplayUtils
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

package com.owncloud.android.presentation.settings.autouploads
package com.owncloud.android.presentation.settings.automaticuploads

import android.content.Intent
import android.net.Uri
import androidx.lifecycle.ViewModel
import androidx.lifecycle.viewModelScope
import com.owncloud.android.R
import com.owncloud.android.db.PreferenceManager.PREF__CAMERA_UPLOADS_DEFAULT_PATH
import com.owncloud.android.domain.camerauploads.model.FolderBackUpConfiguration
import com.owncloud.android.domain.camerauploads.model.FolderBackUpConfiguration.Companion.videoUploadsName
import com.owncloud.android.domain.camerauploads.model.UploadBehavior
import com.owncloud.android.domain.camerauploads.usecases.GetVideoUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.camerauploads.usecases.ResetVideoUploadsUseCase
import com.owncloud.android.domain.camerauploads.usecases.SaveVideoUploadsConfigurationUseCase
import com.owncloud.android.domain.automaticuploads.model.FolderBackUpConfiguration
import com.owncloud.android.domain.automaticuploads.model.FolderBackUpConfiguration.Companion.videoUploadsName
import com.owncloud.android.domain.automaticuploads.model.UploadBehavior
import com.owncloud.android.domain.automaticuploads.usecases.GetVideoUploadsConfigurationStreamUseCase
import com.owncloud.android.domain.automaticuploads.usecases.ResetVideoUploadsUseCase
import com.owncloud.android.domain.automaticuploads.usecases.SaveVideoUploadsConfigurationUseCase
import com.owncloud.android.domain.files.model.OCFile
import com.owncloud.android.domain.spaces.model.OCSpace
import com.owncloud.android.domain.spaces.usecases.GetPersonalSpaceForAccountUseCase
Expand Down Expand Up @@ -189,7 +189,7 @@ class SettingsVideoUploadsViewModel(
}

fun scheduleVideoUploads() {
workManagerProvider.enqueueCameraUploadsWorker()
workManagerProvider.enqueueAutomaticUploadsWorker()
}

private fun composeVideoUploadsConfiguration(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import com.owncloud.android.data.providers.SharedPreferencesProvider
import com.owncloud.android.data.providers.implementation.OCSharedPreferencesProvider
import com.owncloud.android.data.transfers.db.OCTransferEntity
import com.owncloud.android.db.ProviderMeta.ProviderTableMeta
import com.owncloud.android.domain.camerauploads.model.UploadBehavior
import com.owncloud.android.domain.automaticuploads.model.UploadBehavior
import com.owncloud.android.domain.files.model.LIST_MIME_DIR
import com.owncloud.android.domain.transfers.model.TransferStatus
import com.owncloud.android.domain.transfers.model.UploadEnqueuedBy
Expand Down Expand Up @@ -358,7 +358,7 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
if (uri.pathSegments.size > 1) {
sqlQuery.appendWhere(ProviderTableMeta._ID + "=" + uri.pathSegments[1])
}
sqlQuery.projectionMap = cameraUploadSyncProjectionMap
sqlQuery.projectionMap = automaticUploadSyncProjectionMap
}
QUOTAS -> {
sqlQuery.tables = ProviderTableMeta.USER_QUOTAS_TABLE_NAME
Expand Down Expand Up @@ -981,7 +981,7 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
videoUploadsConfiguration?.let { backupLocalDataSource.saveFolderBackupConfiguration(it) }
if (pictureUploadsConfiguration != null || videoUploadsConfiguration != null) {
val workManagerProvider = WorkManagerProvider(context!!)
workManagerProvider.enqueueCameraUploadsWorker()
workManagerProvider.enqueueAutomaticUploadsWorker()
}
}
cursor.close()
Expand Down Expand Up @@ -1052,8 +1052,8 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
for (upload in uploads) {
ocTransferDao.insertOrReplace(upload)
if (upload.status == TransferStatus.TRANSFER_QUEUED.value &&
upload.createdBy != UploadEnqueuedBy.ENQUEUED_AS_CAMERA_UPLOAD_PICTURE.ordinal &&
upload.createdBy != UploadEnqueuedBy.ENQUEUED_AS_CAMERA_UPLOAD_VIDEO.ordinal
upload.createdBy != UploadEnqueuedBy.ENQUEUED_AS_AUTOMATIC_UPLOAD_PICTURE.ordinal &&
upload.createdBy != UploadEnqueuedBy.ENQUEUED_AS_AUTOMATIC_UPLOAD_VIDEO.ordinal
) {
val localFile = File(upload.localPath)
val uploadFileFromSystemUseCase = UploadFileFromSystemUseCase(WorkManager.getInstance(context!!))
Expand Down Expand Up @@ -1499,13 +1499,13 @@ class FileContentProvider(val executors: Executors = Executors()) : ContentProvi
uploadProjectionMap[ProviderTableMeta.UPLOADS_TRANSFER_ID] = ProviderTableMeta.UPLOADS_TRANSFER_ID
}

private val cameraUploadSyncProjectionMap = HashMap<String, String>()
private val automaticUploadSyncProjectionMap = HashMap<String, String>()

init {
cameraUploadSyncProjectionMap[ProviderTableMeta._ID] = ProviderTableMeta._ID
cameraUploadSyncProjectionMap[ProviderTableMeta.PICTURES_LAST_SYNC_TIMESTAMP] =
automaticUploadSyncProjectionMap[ProviderTableMeta._ID] = ProviderTableMeta._ID
automaticUploadSyncProjectionMap[ProviderTableMeta.PICTURES_LAST_SYNC_TIMESTAMP] =
ProviderTableMeta.PICTURES_LAST_SYNC_TIMESTAMP
cameraUploadSyncProjectionMap[ProviderTableMeta.VIDEOS_LAST_SYNC_TIMESTAMP] =
automaticUploadSyncProjectionMap[ProviderTableMeta.VIDEOS_LAST_SYNC_TIMESTAMP] =
ProviderTableMeta.VIDEOS_LAST_SYNC_TIMESTAMP
}

Expand Down
Loading

0 comments on commit 5350049

Please sign in to comment.