Skip to content

Commit

Permalink
Minor behavior changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jordanbaird committed Sep 30, 2024
1 parent 055ed28 commit 01039cf
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Ice/MenuBar/MenuBarItemManager.swift
Original file line number Diff line number Diff line change
Expand Up @@ -745,7 +745,6 @@ extension MenuBarItemManager {
}
}
}

do {
try await frameCheckTask.value
} catch is FrameCheckCancellationError {
Expand Down Expand Up @@ -967,13 +966,14 @@ extension MenuBarItemManager {

/// Moves a menu bar item to the given destination and waits until the move
/// completes before returning.
///
///
/// - Parameters:
/// - item: A menu bar item to move.
/// - destination: A destination to move the menu bar item.
func slowMove(item: MenuBarItem, to destination: MoveDestination) async throws {
/// - timeout: Amount of time to wait before throwing an error.
func slowMove(item: MenuBarItem, to destination: MoveDestination, timeout: Duration = .seconds(1)) async throws {
try await move(item: item, to: destination)
let waitTask = Task(timeout: .seconds(1)) {
let waitTask = Task(timeout: timeout) {
while true {
try Task.checkCancellation()
if try await self.itemHasCorrectPosition(item: item, for: destination) {
Expand Down Expand Up @@ -1284,7 +1284,7 @@ extension MenuBarItemManager {
let interfaceCheckTask = Task(timeout: .seconds(1)) {
while await self.tempShownItemContexts.contains(where: { $0.isShowingInterface }) {
try Task.checkCancellation()
try await Task.sleep(for: .milliseconds(10))
try await Task.sleep(for: .milliseconds(100))
}
}
do {
Expand Down

0 comments on commit 01039cf

Please sign in to comment.