mirror of
https://github.com/nextcloud/android.git
synced 2024-11-23 05:35:39 +03:00
Reset eTag so that capability get parsed again, so status is set
Signed-off-by: tobiasKaminsky <tobias@kaminsky.me>
This commit is contained in:
parent
e51ac4876f
commit
baa0de428f
2 changed files with 18 additions and 1 deletions
|
@ -35,7 +35,7 @@ import java.util.List;
|
|||
*/
|
||||
public class ProviderMeta {
|
||||
public static final String DB_NAME = "filelist";
|
||||
public static final int DB_VERSION = 60;
|
||||
public static final int DB_VERSION = 61;
|
||||
|
||||
private ProviderMeta() {
|
||||
// No instance
|
||||
|
|
|
@ -2288,6 +2288,23 @@ public class FileContentProvider extends ContentProvider {
|
|||
if (!upgraded) {
|
||||
Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
|
||||
}
|
||||
|
||||
if (oldVersion < 61 && newVersion >= 61) {
|
||||
Log_OC.i(SQL, "Entering in the #61 reset eTag to force capability refresh");
|
||||
db.beginTransaction();
|
||||
try {
|
||||
db.execSQL("UPDATE capabilities SET etag = '' WHERE 1=1");
|
||||
|
||||
upgraded = true;
|
||||
db.setTransactionSuccessful();
|
||||
} finally {
|
||||
db.endTransaction();
|
||||
}
|
||||
}
|
||||
|
||||
if (!upgraded) {
|
||||
Log_OC.i(SQL, String.format(Locale.ENGLISH, UPGRADE_VERSION_MSG, oldVersion, newVersion));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue