Dont show toast

Signed-off-by: alperozturk <alper_ozturk@proton.me>
This commit is contained in:
alperozturk 2024-08-23 09:14:01 +02:00
parent 27b8787ad6
commit 9c2f7e4642
No known key found for this signature in database
GPG key ID: 4E577DC593B59BDF
2 changed files with 2 additions and 2 deletions

View file

@ -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.OnRemoteOperationListener;
import com.owncloud.android.lib.common.operations.RemoteOperation; import com.owncloud.android.lib.common.operations.RemoteOperation;
import com.owncloud.android.lib.common.operations.RemoteOperationResult; import com.owncloud.android.lib.common.operations.RemoteOperationResult;
import com.owncloud.android.lib.common.utils.Log_OC;
import androidx.annotation.NonNull; import androidx.annotation.NonNull;
@ -48,7 +49,7 @@ public abstract class SyncOperation extends RemoteOperation {
*/ */
public RemoteOperationResult execute(Context context) { public RemoteOperationResult execute(Context context) {
if (storageManager.getUser().isAnonymous()) { 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); return new RemoteOperationResult(RemoteOperationResult.ResultCode.ACCOUNT_EXCEPTION);
} else { } else {
return super.execute(this.storageManager.getUser(), context); return super.execute(this.storageManager.getUser(), context);

View file

@ -6,7 +6,6 @@
~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only ~ SPDX-License-Identifier: AGPL-3.0-or-later OR GPL-2.0-only
--> -->
<resources> <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_android">%1$s Android app</string>
<string name="about_version">version %1$s</string> <string name="about_version">version %1$s</string>
<string name="about_version_with_build">version %1$s, build #%2$s</string> <string name="about_version_with_build">version %1$s, build #%2$s</string>