Skip to content

Commit

Permalink
[android] clear database when loging out
Browse files Browse the repository at this point in the history
  • Loading branch information
wingjay committed Dec 16, 2016
1 parent 2aafe34 commit 7fe84ea
Showing 1 changed file with 4 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
import com.wingjay.jianshi.Constants;
import com.wingjay.jianshi.R;
import com.wingjay.jianshi.bean.User;
import com.wingjay.jianshi.db.model.Diary;
import com.wingjay.jianshi.db.model.EventLog;
import com.wingjay.jianshi.db.model.PushData;
import com.wingjay.jianshi.network.JsonDataResponse;
import com.wingjay.jianshi.network.UserService;
Expand Down Expand Up @@ -180,7 +182,8 @@ public void onClick(DialogInterface dialogInterface, int i) {
private void doLogout(final @NonNull Context context) {
userPrefs.clear();
SQLite.delete().from(PushData.class).execute();
SQLite.delete().from(PushData.class).execute();
SQLite.delete().from(EventLog.class).execute();
SQLite.delete().from(Diary.class).execute();
context.startActivity(SignupActivity.createIntent(context));
}
}

0 comments on commit 7fe84ea

Please sign in to comment.