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

Commit

Permalink
Fix occasional crash when entering login screen (#103)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tunous authored Jan 12, 2020
1 parent ca9e8d6 commit 8667b12
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
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

0 comments on commit 8667b12

Please sign in to comment.