Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
Plasma Mobile
Commits
02bc67af
Commit
02bc67af
authored
Apr 29, 2022
by
Yari Polla
Committed by
Devin Lin
Apr 29, 2022
Browse files
taskswitcher: add delay for tasks reordering
parent
8f128913
Pipeline
#169524
passed with stage
in 1 minute and 11 seconds
Changes
2
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
components/mobileshell/qml/taskswitcher/Task.qml
View file @
02bc67af
...
...
@@ -46,6 +46,7 @@ Item {
}
function
activateApp
()
{
taskSwitcherState
.
wasInActiveTask
=
false
;
taskSwitcher
.
activateWindow
(
model
.
index
);
}
//END functions
...
...
components/mobileshell/qml/taskswitcher/TaskSwitcher.qml
View file @
02bc67af
...
...
@@ -73,6 +73,14 @@ Item {
oldTasksCount
=
tasksCount
;
}
Timer
{
id
:
reorderTimer
interval
:
5000
onTriggered
:
tasksModel
.
taskReorderingEnabled
=
true
}
//BEGIN functions
function
show
(
animation
)
{
...
...
@@ -83,6 +91,9 @@ Item {
taskSwitcherState
.
wasInActiveTask
=
tasksModel
.
activeTask
.
row
>=
0
;
taskSwitcherState
.
currentlyBeingOpened
=
true
;
reorderTimer
.
stop
();
tasksModel
.
taskReorderingEnabled
=
false
;
// skip to first active task
if
(
taskSwitcherState
.
wasInActiveTask
)
{
taskSwitcherState
.
goToTaskIndex
(
tasksModel
.
activeTask
.
row
);
...
...
@@ -140,6 +151,12 @@ Item {
}
instantHide
();
if
(
taskSwitcherState
.
wasInActiveTask
)
{
reorderTimer
.
restart
();
}
else
{
tasksModel
.
taskReorderingEnabled
=
true
;
}
}
function
minimizeAll
()
{
...
...
@@ -156,6 +173,7 @@ Item {
easing.type
:
Easing
.
InOutQuad
onFinished
:
{
root
.
visible
=
false
;
tasksModel
.
taskReorderingEnabled
=
true
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment