Skip to content

Commit

Permalink
Fixed custom tag filter position with keyboard
Browse files Browse the repository at this point in the history
  • Loading branch information
michalrentka committed Sep 19, 2023
1 parent 6878aab commit 88f888f
Showing 1 changed file with 12 additions and 5 deletions.
17 changes: 12 additions & 5 deletions Zotero/Scenes/Master/MasterContainerViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,17 @@ final class MasterContainerViewController: UINavigationController {

func topOffset(availableHeight: CGFloat) -> CGFloat {
switch self {
case .mostlyVisible: return 202
case .default: return availableHeight * 0.6
case .hidden: return availableHeight - MasterContainerViewController.bottomControllerHandleHeight
case .custom(let offset): return offset
case .mostlyVisible:
return 202

case .default:
return availableHeight * 0.6

case .hidden:
return availableHeight - MasterContainerViewController.bottomControllerHandleHeight

case .custom(let offset):
return availableHeight - offset < MasterContainerViewController.minVisibleBottomHeight ? MasterContainerViewController.minVisibleBottomHeight : offset
}
}
}
Expand Down Expand Up @@ -227,7 +234,7 @@ final class MasterContainerViewController: UINavigationController {
}
}

if yPos > (containerHeight - MasterContainerViewController.minVisibleBottomHeight) {
if yPos > (containerHeight - Self.minVisibleBottomHeight) {
return velocity.y > 0 ? .hidden : .default
}

Expand Down

0 comments on commit 88f888f

Please sign in to comment.