Simplify compositor and shell conditionals
Flatten nested guards in swipe cleanup, recording updates and popup dismissal. Use an eager optional fallback for workspace layouts and an array in the malformed-opacity test.
This commit is contained in:
1 parent
3ba1f3522d
commit
5706a71941
5 files changed
+13
-15
No files matched your search
@@ -159,10 +159,8 @@ impl Recorder {
|
||||
match event {
|
||||
Event::Update(update) => match update.state.as_str() {
|
||||
"selecting" if self.control.is_some() => self.state = State::Selecting,
|
||||
"recording" if self.control.is_some() => {
|
||||
if !matches!(self.state, State::Recording(_)) {
|
||||
self.state = State::Recording(Instant::now());
|
||||
}
|
||||
"recording" if self.control.is_some() && !matches!(self.state, State::Recording(_)) => {
|
||||
self.state = State::Recording(Instant::now());
|
||||
}
|
||||
"saving" => self.state = State::Saving,
|
||||
"saved" => {
|
||||
|
||||
Reference in new issue
Block a user