Fix: prevent multiple notifications from profile change

This commit is contained in:
Luke D. Jones
2023-06-25 20:43:43 +12:00
parent 8b77078a6f
commit cb88c9f0e2
4 changed files with 33 additions and 34 deletions

View File

@@ -71,6 +71,15 @@ impl Profile {
_ => Self::Balanced,
}
}
pub fn get_next_profile(current: Profile) -> Profile {
// Read first just incase the user has modified the config before calling this
match current {
Profile::Balanced => Profile::Performance,
Profile::Performance => Profile::Quiet,
Profile::Quiet => Profile::Balanced,
}
}
}
impl Default for Profile {