Make EditAccount keyboard-flickable, fix function
This commit is contained in:
parent
41eea44fff
commit
414082d258
|
@ -9,6 +9,7 @@ import "../../utils.js" as Utils
|
||||||
|
|
||||||
HPage {
|
HPage {
|
||||||
id: editAccount
|
id: editAccount
|
||||||
|
Component.onCompleted: shortcuts.flickTarget = flickable
|
||||||
|
|
||||||
property int avatarPreferredSize: 256
|
property int avatarPreferredSize: 256
|
||||||
|
|
||||||
|
|
|
@ -7,13 +7,10 @@ Item {
|
||||||
property Item flickTarget: Item {}
|
property Item flickTarget: Item {}
|
||||||
|
|
||||||
function smartVerticalFlick(baseVelocity, fastMultiply=3) {
|
function smartVerticalFlick(baseVelocity, fastMultiply=3) {
|
||||||
let vel = flickTarget.verticalVelocity
|
if (! flickTarget.interactive) { return }
|
||||||
|
|
||||||
if (flickTarget.verticalLayoutDirection == ListView.BottomToTop) {
|
|
||||||
baseVelocity = -baseVelocity
|
baseVelocity = -baseVelocity
|
||||||
vel = -vel
|
let vel = -flickTarget.verticalVelocity
|
||||||
}
|
|
||||||
|
|
||||||
let fast = (baseVelocity < 0 && vel < baseVelocity / 2) ||
|
let fast = (baseVelocity < 0 && vel < baseVelocity / 2) ||
|
||||||
(baseVelocity > 0 && vel > baseVelocity / 2)
|
(baseVelocity > 0 && vel > baseVelocity / 2)
|
||||||
|
|
||||||
|
|
|
@ -74,19 +74,19 @@ Item {
|
||||||
id: initialRoomTimer
|
id: initialRoomTimer
|
||||||
interval: 4000
|
interval: 4000
|
||||||
repeat: false
|
repeat: false
|
||||||
onTriggered: pageStack.showRoom(
|
// onTriggered: pageStack.showRoom(
|
||||||
"@test_mary:matrix.org",
|
// "@test_mary:matrix.org",
|
||||||
"Rooms",
|
// "Rooms",
|
||||||
// "!TSXGsbBbdwsdylIOJZ:matrix.org" // st
|
// "!TSXGsbBbdwsdylIOJZ:matrix.org" // st
|
||||||
// "!VDSsFIzQnXARSCVNxS:matrix.org" // hs
|
// "!VDSsFIzQnXARSCVNxS:matrix.org" // hs
|
||||||
"!XhxUcnVhVhUHkBZEIL:matrix.org" // nc
|
// "!XhxUcnVhVhUHkBZEIL:matrix.org" // nc
|
||||||
// "Invites",
|
// "Invites",
|
||||||
// "!xjqvLOGhMVutPXpAqi:matrix.org"
|
// "!xjqvLOGhMVutPXpAqi:matrix.org"
|
||||||
)
|
|
||||||
// onTriggered: pageStack.showPage(
|
|
||||||
// "EditAccount/EditAccount",
|
|
||||||
// {"userId": "@test_mary:matrix.org"}
|
|
||||||
// )
|
// )
|
||||||
|
onTriggered: pageStack.showPage(
|
||||||
|
"EditAccount/EditAccount",
|
||||||
|
{"userId": "@test_mary:matrix.org"}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
onCurrentItemChanged: if (currentItem) {
|
onCurrentItemChanged: if (currentItem) {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user