Skip to content

Commit

Permalink
refactor: call self.is_maximized if and only if MAXIMIZE is set
Browse files Browse the repository at this point in the history
in the source bit flag
  • Loading branch information
ahkohd committed Jul 15, 2024
1 parent a3fe842 commit 5218fb9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion plugins/window-state/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,7 @@ trait WindowExtInternal {

impl<R: Runtime> WindowExtInternal for Window<R> {
fn update_state(&self, state: &mut WindowState, flags: StateFlags) -> tauri::Result<()> {
let is_maximized = match flags.intersects(StateFlags::MAXIMIZED | StateFlags::SIZE) {
let is_maximized = match flags.intersects(StateFlags::MAXIMIZED) {
true => self.is_maximized()?,
false => false,
};
Expand Down

0 comments on commit 5218fb9

Please sign in to comment.