Browse Source

make info box generic

AndyScherzinger 6 years ago
parent
commit
456bde9cb3

+ 2 - 2
src/main/java/com/owncloud/android/ui/activity/FileDisplayActivity.java

@@ -1329,7 +1329,7 @@ public class FileDisplayActivity extends HookActivity
                                 synchResult != null) {
 
                             if (synchResult.isSuccess()) {
-                                setMaintenanceMode(false);
+                                hideInfoBox();
                             } else {
                                 // TODO refactor and make common
                                 if (checkForRemoteOperationError(synchResult)) {
@@ -1338,7 +1338,7 @@ public class FileDisplayActivity extends HookActivity
                                         synchResult.getCode())) {
                                     showUntrustedCertDialog(synchResult);
                                 } else if (ResultCode.MAINTENANCE_MODE.equals(synchResult.getCode())) {
-                                    setMaintenanceMode(true);
+                                    showInfoBox(R.string.maintenance_mode);
                                 }
                             }
                         }

+ 0 - 26
src/main/java/com/owncloud/android/ui/activity/ToolbarActivity.java

@@ -154,32 +154,6 @@ public abstract class ToolbarActivity extends BaseActivity {
         return file == null || (file.isFolder() && file.getParentId() == FileDataStorageManager.ROOT_PARENT_ID);
     }
 
-    /**
-     * de-/activates the maintenance message within the toolbar.
-     *
-     * @param active flag is mode should be de-/activated
-     */
-    protected final void setMaintenanceMode(boolean active) {
-        if (active) {
-            showInfoBox(R.string.maintenance_mode);
-        } else {
-            hideInfoBox();
-        }
-    }
-
-    /**
-     * de-/activates the offline message within the toolbar.
-     *
-     * @param active flag is mode should be de-/activated
-     */
-    protected final void setOfflineMode(boolean active) {
-        if (active) {
-            showInfoBox(R.string.offline_mode);
-        } else {
-            hideInfoBox();
-        }
-    }
-
     /**
      * shows the toolbar's info box with the given text.
      *