Explorar o código

do not show warning on very first start

tobiasKaminsky %!s(int64=7) %!d(string=hai) anos
pai
achega
0f38520417

+ 5 - 0
src/main/java/com/owncloud/android/providers/FileContentProvider.java

@@ -43,11 +43,13 @@ import android.text.TextUtils;
 import com.owncloud.android.MainApp;
 import com.owncloud.android.R;
 import com.owncloud.android.datamodel.OCFile;
+import com.owncloud.android.db.PreferenceManager;
 import com.owncloud.android.db.ProviderMeta;
 import com.owncloud.android.db.ProviderMeta.ProviderTableMeta;
 import com.owncloud.android.lib.common.accounts.AccountUtils;
 import com.owncloud.android.lib.common.utils.Log_OC;
 import com.owncloud.android.lib.resources.shares.ShareType;
+import com.owncloud.android.ui.activity.FileDisplayActivity;
 import com.owncloud.android.utils.FileStorageUtils;
 import com.owncloud.android.utils.MimeType;
 
@@ -689,6 +691,9 @@ public class FileContentProvider extends ContentProvider {
 
             // Create filesystem table
             createFileSystemTable(db);
+
+            PreferenceManager.getDefaultSharedPreferences(getContext()).edit()
+                    .putBoolean(FileDisplayActivity.KEY_SHOW_ACCOUNT_WARNING, false).apply();
         }
 
         @Override

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

@@ -124,7 +124,7 @@ import static com.owncloud.android.db.PreferenceManager.getSortOrder;
 public class FileDisplayActivity extends HookActivity
         implements FileFragment.ContainerActivity,
         OnEnforceableRefreshListener, SortingOrderDialogFragment.OnSortingOrderListener {
-    private static final String KEY_SHOW_ACCOUNT_WARNING = "SHOW_ACCOUNT_WARNING";
+    public static final String KEY_SHOW_ACCOUNT_WARNING = "SHOW_ACCOUNT_WARNING";
 
     private SyncBroadcastReceiver mSyncBroadcastReceiver;
     private UploadFinishReceiver mUploadFinishReceiver;