Skip to content
This repository was archived by the owner on Sep 20, 2023. It is now read-only.

Right align bookmark icon (#1958) #2232

Merged
merged 1 commit into from
Oct 7, 2018
Merged
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
6 changes: 5 additions & 1 deletion Classes/Issues/IssuesViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ final class IssuesViewController:
bottom: 2 * Styles.Sizes.rowSpacing + Styles.Sizes.tableCellHeight,
right: Styles.Sizes.gutter
)
private let bookmarkIconInset = UIEdgeInsets(top: 0, left: 16, bottom: 0, right: 0)

private var needsScrollToBottom = false
private var lastTimelineElement: ListDiffable?
Expand Down Expand Up @@ -198,7 +199,9 @@ final class IssuesViewController:
messageView.add(contentView: actions)

//show disabled bookmark button until issue has finished loading
navigationItem.rightBarButtonItems = [ moreOptionsItem, BookmarkNavigationController.disabledNavigationItem ]
let disabledNavItem = BookmarkNavigationController.disabledNavigationItem
disabledNavItem.imageInsets = bookmarkIconInset
navigationItem.rightBarButtonItems = [ moreOptionsItem, disabledNavItem ]

// insert below so button doesn't appear above autocomplete
view.insertSubview(manageController.manageButton, belowSubview: messageView)
Expand Down Expand Up @@ -261,6 +264,7 @@ final class IssuesViewController:
guard let rightbarButtonItems = navigationItem.rightBarButtonItems else { return }
guard let bookmarkItem = rightbarButtonItems.last else { return }
bookmarkNavController?.configureNavigationItem(bookmarkItem)
bookmarkItem.imageInsets = bookmarkIconInset
}

func viewRepoAction() -> UIAlertAction? {
Expand Down