Skip to content
This repository was archived by the owner on Nov 28, 2024. It is now read-only.

Commit 6457182

Browse files
authored
Fix logout (#61)
Logout was not killing the app fully, leaving some variables from the previous session partially initialised. See also FreshRSS/FreshRSS#2961
1 parent a5292f3 commit 6457182

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

app/src/main/java/org/freshrss/easyrss/Home.java

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -251,22 +251,23 @@ public void onLogoutRequired() {
251251
public void onClick(final DialogInterface dialog, final int which) {
252252
ProgressDialog.show(new ContextThemeWrapper(Home.this, android.R.style.Theme_DeviceDefault_Dialog),
253253
Home.this.getString(R.string.TxtWorking), Home.this.getString(R.string.TxtClearingCache));
254-
final Handler handler = new Handler() {
254+
/*final Handler handler = new Handler() {
255255
@Override
256256
public void handleMessage(final Message msg) {
257257
final Intent intent = new Intent(Home.this, Home.class);
258258
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
259259
Home.this.startActivity(intent);
260260
finish();
261261
}
262-
};
262+
};*/
263263
final Thread thread = new Thread() {
264264
@Override
265265
public void run() {
266266
DataMgr.getInstance().clearAll();
267267
ReaderAccountMgr.getInstance().clearLogin();
268268
DataUtils.deleteFile(new File(DataUtils.getAppFolderPath()));
269-
handler.sendEmptyMessage(0);
269+
//handler.sendEmptyMessage(0);
270+
System.exit(0);
270271
}
271272
};
272273
thread.setPriority(Thread.MIN_PRIORITY);

app/src/main/java/org/freshrss/easyrss/network/GlobalItemDataSyncer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ protected void startSyncing() throws DataSyncerException {
139139
NetworkMgr.getInstance().startSyncItemContent();
140140

141141
final SettingNotificationOn sNotification = new SettingNotificationOn(dataMgr);
142-
if (sNotification.getData()) {
142+
if (sNotification.getData() != null) {
143143
final String sSetting = dataMgr.getSettingByName(Setting.SETTING_GLOBAL_ITEM_UNREAD_COUNT);
144144
final int unreadCount = (sSetting == null) ? 0 : Integer.valueOf(sSetting);
145145
if (unreadCount > 0) {

0 commit comments

Comments
 (0)