mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
Fix sync hang on logout/login. (#572)
This commit is contained in:
parent
3905ab81dc
commit
1fe9fa967e
2 changed files with 5 additions and 0 deletions
|
@ -662,6 +662,10 @@ public class NBSyncService extends Service {
|
||||||
HaltNow = true;
|
HaltNow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static void resumeFromInterrupt() {
|
||||||
|
HaltNow = false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onDestroy() {
|
public void onDestroy() {
|
||||||
Log.d(this.getClass().getName(), "onDestroy");
|
Log.d(this.getClass().getName(), "onDestroy");
|
||||||
|
|
|
@ -31,6 +31,7 @@ import com.newsblur.service.NBSyncService;
|
||||||
public class PrefsUtils {
|
public class PrefsUtils {
|
||||||
|
|
||||||
public static void saveLogin(final Context context, final String userName, final String cookie) {
|
public static void saveLogin(final Context context, final String userName, final String cookie) {
|
||||||
|
NBSyncService.resumeFromInterrupt();
|
||||||
final SharedPreferences preferences = context.getSharedPreferences(PrefConstants.PREFERENCES, 0);
|
final SharedPreferences preferences = context.getSharedPreferences(PrefConstants.PREFERENCES, 0);
|
||||||
final Editor edit = preferences.edit();
|
final Editor edit = preferences.edit();
|
||||||
edit.putString(PrefConstants.PREF_COOKIE, cookie);
|
edit.putString(PrefConstants.PREF_COOKIE, cookie);
|
||||||
|
|
Loading…
Add table
Reference in a new issue