mirror of
https://github.com/nextcloud/android.git
synced 2024-11-24 06:05:42 +03:00
Dont show toast
Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
parent
27b8787ad6
commit
9c2f7e4642
2 changed files with 2 additions and 2 deletions
|
@ -20,6 +20,7 @@ import com.owncloud.android.lib.common.OwnCloudClient;
|
|||
import com.owncloud.android.lib.common.operations.OnRemoteOperationListener;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperation;
|
||||
import com.owncloud.android.lib.common.operations.RemoteOperationResult;
|
||||
import com.owncloud.android.lib.common.utils.Log_OC;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
|
||||
|
@ -48,7 +49,7 @@ public abstract class SyncOperation extends RemoteOperation {
|
|||
*/
|
||||
public RemoteOperationResult execute(Context context) {
|
||||
if (storageManager.getUser().isAnonymous()) {
|
||||
ContextExtensionsKt.showToast(context, R.string.anonymous_account_type_warning_text);
|
||||
Log_OC.d("SyncOperation","Trying to execute a sync operation with anonymous account, operation cancelled");
|
||||
return new RemoteOperationResult(RemoteOperationResult.ResultCode.ACCOUNT_EXCEPTION);
|
||||
} else {
|
||||
return super.execute(this.storageManager.getUser(), context);
|
||||
|
|
|
@ -6,7 +6,6 @@
|
|||
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
|
||||
-->
|
||||
<resources>
|
||||
<string name="anonymous_account_type_warning_text">Trying to execute a sync operation with anonymous account, operation cancelled"</string>
|
||||
<string name="about_android">%1$s Android app</string>
|
||||
<string name="about_version">version %1$s</string>
|
||||
<string name="about_version_with_build">version %1$s, build #%2$s</string>
|
||||
|
|
Loading…
Reference in a new issue