Skip to content
This repository has been archived by the owner on Jun 9, 2023. It is now read-only.

Fix occasional crash when entering login screen #103

Merged
merged 2 commits into from
Jan 12, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
### Changed
- Renamed application to "Dawn" ([#74](https://github.com/Tunous/Dawn/pull/74))

### Fixed
- Occasional crash when entering login screen ([#103](https://github.com/Tunous/Dawn/pull/103))

## [0.8.0] - 2019-08-22
### Added
- Subscribing to /r/all ([#28](https://github.com/Tunous/Dank/pull/28))
Expand Down
7 changes: 6 additions & 1 deletion app/src/main/java/me/saket/dank/reddit/jraw/JrawReddit.kt
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
package me.saket.dank.reddit.jraw

import io.reactivex.Completable
import io.reactivex.schedulers.Schedulers.io
import io.reactivex.subjects.BehaviorSubject
import me.saket.dank.reddit.Reddit
import me.saket.dank.ui.user.UserSessionRepository
Expand Down Expand Up @@ -35,7 +37,10 @@ class JrawReddit @Inject constructor(
}
else -> {
Timber.i("Switching to userless")
accountHelper.switchToUserless()
Completable.fromAction {
accountHelper.switchToUserless()
}.subscribeOn(io())
.subscribe()
}
}

Expand Down