mirror of
https://github.com/commons-app/apps-android-commons.git
synced 2025-10-26 20:33:53 +01:00
Logout thing
This commit is contained in:
parent
cce8c27a66
commit
aec4300a2e
4 changed files with 16 additions and 2 deletions
|
|
@ -255,8 +255,7 @@ public class CommonsApplication extends Application {
|
||||||
currentAccount = null;
|
currentAccount = null;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateAllDatabases(Context context)
|
public void updateAllDatabases(Context context) {
|
||||||
{
|
|
||||||
DBOpenHelper dbOpenHelper = DBOpenHelper.getInstance(context);
|
DBOpenHelper dbOpenHelper = DBOpenHelper.getInstance(context);
|
||||||
dbOpenHelper.getReadableDatabase().close();
|
dbOpenHelper.getReadableDatabase().close();
|
||||||
SQLiteDatabase db = dbOpenHelper.getWritableDatabase();
|
SQLiteDatabase db = dbOpenHelper.getWritableDatabase();
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,11 @@ public class Category {
|
||||||
db.execSQL(CREATE_TABLE_STATEMENT);
|
db.execSQL(CREATE_TABLE_STATEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onDelete(SQLiteDatabase db) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
||||||
|
onCreate(db);
|
||||||
|
}
|
||||||
|
|
||||||
public static void onUpdate(SQLiteDatabase db, int from, int to) {
|
public static void onUpdate(SQLiteDatabase db, int from, int to) {
|
||||||
if(from == to) {
|
if(from == to) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -331,6 +331,11 @@ public class Contribution extends Media {
|
||||||
db.execSQL(CREATE_TABLE_STATEMENT);
|
db.execSQL(CREATE_TABLE_STATEMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onDelete(SQLiteDatabase db) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
||||||
|
onCreate(db);
|
||||||
|
}
|
||||||
|
|
||||||
public static void onUpdate(SQLiteDatabase db, int from, int to) {
|
public static void onUpdate(SQLiteDatabase db, int from, int to) {
|
||||||
if(from == to) {
|
if(from == to) {
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -142,5 +142,10 @@ public class ModifierSequence {
|
||||||
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
||||||
onCreate(db);
|
onCreate(db);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void onDelete(SQLiteDatabase db) {
|
||||||
|
db.execSQL("DROP TABLE IF EXISTS " + TABLE_NAME);
|
||||||
|
onCreate(db);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue