Skip to content
This repository has been archived by the owner on Nov 26, 2020. It is now read-only.

Commit

Permalink
Fix horizontal scroll direction not working (#305)
Browse files Browse the repository at this point in the history
Setting the scroll direction to horizontal on the config was
ignored because the current scroll direction returned 0 instead of
nil on the first run, so it never reaches the guard's else block.
  • Loading branch information
revolter authored and hebertialmeida committed Jan 22, 2018
1 parent 49039e3 commit 95130bf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/FolioReaderKit.swift
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ extension FolioReader {
/// Check the current scroll direction. Default .defaultVertical
open var currentScrollDirection: Int {
get {
guard let value = self.defaults.integer(forKey: kCurrentScrollDirection) as? Int else {
guard let value = self.defaults.value(forKey: kCurrentScrollDirection) as? Int else {
return FolioReaderScrollDirection.defaultVertical.rawValue
}

Expand Down

0 comments on commit 95130bf

Please sign in to comment.