import android.database.sqlite.SQLiteDatabase;
import android.os.AsyncTask;
+import net.ktnx.mobileledger.App;
import net.ktnx.mobileledger.async.RetrieveTransactionsTask;
import net.ktnx.mobileledger.ui.activity.MainActivity;
import net.ktnx.mobileledger.utils.LockHolder;
}
public static void setCurrentProfile(MobileLedgerProfile newProfile) {
MLDB.setOption(MLDB.OPT_PROFILE_UUID, newProfile.getUuid());
+ stopTransactionsRetrieval();
profile.postValue(newProfile);
}
public static int getProfileIndex(MobileLedgerProfile profile) {
String profileUUID = MLDB.getOption(MLDB.OPT_PROFILE_UUID, null);
if (profileUUID == null) return -1;
- SQLiteDatabase db = MLDB.getDatabase();
+ SQLiteDatabase db = App.getDatabase();
try (Cursor c = db
.rawQuery("SELECT theme from profiles where uuid=?", new String[]{profileUUID}))
{