From 3ef1744b5cf7bf18bf182c4bea84610a23d9cb60 Mon Sep 17 00:00:00 2001 From: Black Hat Date: Thu, 13 Sep 2018 11:58:02 +0800 Subject: [PATCH] UI logic tweaking. --- js/util.js | 4 ++-- qml/main.qml | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/js/util.js b/js/util.js index 56d75da..fcd0e97 100644 --- a/js/util.js +++ b/js/util.js @@ -18,8 +18,8 @@ function pushToStack(stack, page) { if(stack.depth === 1) { stack.replace(page) } else { - stack.clear() - stack.push(page) + stack.pop(null) + stack.replace(page) } } } diff --git a/qml/main.qml b/qml/main.qml index 5f3de31..6e46b2d 100644 --- a/qml/main.qml +++ b/qml/main.qml @@ -9,6 +9,7 @@ import Matrique.Settings 0.1 import "component" import "form" +import "qrc:/js/util.js" as Util ApplicationWindow { readonly property var currentConnection: accountListView.currentConnection ? accountListView.currentConnection : null @@ -131,7 +132,7 @@ ApplicationWindow { hint: user.displayName image: user.avatar - defaultColor: Material.accent + defaultColor: Util.stringToColor(user.displayName) } highlightColor: matriqueController.color(user.id)