Skip to content

Commit

Permalink
Merge pull request #789 from hyperoslo/fix/focused-item-index-bug
Browse files Browse the repository at this point in the history
Set focused item index to zero if index is nil when updating the delegates
  • Loading branch information
zenangst committed Jan 2, 2018
2 parents 0c0be0a + ba397b0 commit db24911
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion Sources/iOS/Classes/SpotsController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -374,8 +374,9 @@ extension SpotsController {
$0.focusDelegate = self
}

if focusedComponent == nil {
if focusedComponent == nil && focusedItemIndex == nil {
focusedComponent = components.first
focusedItemIndex = 0
}
}

Expand Down
2 changes: 1 addition & 1 deletion Spots.podspec
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Pod::Spec.new do |s|
s.name = "Spots"
s.summary = "A cross-platform view controller framework for building component-based UIs"
s.version = "7.4.1"
s.version = "7.4.2"
s.homepage = "https://github.com/hyperoslo/Spots"
s.license = 'MIT'
s.author = { "Hyper Interaktiv AS" => "ios@hyper.no" }
Expand Down

0 comments on commit db24911

Please sign in to comment.