Skip to content

Commit

Permalink
Fix animated: false not working (#105)
Browse files Browse the repository at this point in the history
  • Loading branch information
francisfeng authored Jul 22, 2023
1 parent 11e232f commit b99f45c
Showing 1 changed file with 9 additions and 10 deletions.
19 changes: 9 additions & 10 deletions Sources/Settings/SettingsTabViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -154,16 +154,15 @@ final class SettingsTabViewController: NSViewController, SettingsStyleController
options: NSViewController.TransitionOptions = [],
completionHandler completion: (() -> Void)? = nil
) {
let isAnimated = options
.isSubset(of: [
.crossfade,
.slideUp,
.slideDown,
.slideForward,
.slideBackward,
.slideLeft,
.slideRight
])
let isAnimated = !options.isEmpty && options.isSubset(of: [
.crossfade,
.slideUp,
.slideDown,
.slideForward,
.slideBackward,
.slideLeft,
.slideRight
])

if isAnimated {
NSAnimationContext.runAnimationGroup({ context in
Expand Down

0 comments on commit b99f45c

Please sign in to comment.