Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ui/StatusQ/src/StatusQ/Core/StatusScrollView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ T.ScrollView {
}

function scrollEnd() {
flickable.contentY = flickable.contentHeight - flickable.height
flickable.contentY = Math.max(0, flickable.contentHeight - flickable.height)
}

function scrollPageUp() {
Expand Down
27 changes: 15 additions & 12 deletions ui/imports/shared/popups/keycard/KeycardPopup.qml
Original file line number Diff line number Diff line change
Expand Up @@ -91,39 +91,42 @@ StatusDialog {
root.sharedKeycardModule.currentState.doCancelAction();
}

topPadding: 0
bottomPadding: 0

contentItem: StatusScrollView {
id: scrollView
contentWidth: availableWidth
padding: 0

// keep content visible on mobile when keyboard activated
onHeightChanged: scrollView.scrollEnd()
onHeightChanged: {
Qt.callLater(() => {
scrollView.scrollEnd()
})
}

KeycardPopupContent {
id: content
width: scrollView.availableWidth
implicitHeight: {
let baseHeight = Constants.keycard.general.popupHeight

height: {
// for all flows
if (root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.keycardMetadataDisplay ||
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.factoryResetConfirmationDisplayMetadata) {
if (!root.sharedKeycardModule.keyPairStoredOnKeycardIsKnown) {
baseHeight = Constants.keycard.general.popupBiggerHeight
}
if (!root.sharedKeycardModule.keyPairStoredOnKeycardIsKnown)
return Constants.keycard.general.popupBiggerHeight
}

if (root.sharedKeycardModule.currentState.flowType === Constants.keycardSharedFlow.importFromKeycard &&
root.sharedKeycardModule.currentState.stateType === Constants.keycardSharedState.manageKeycardAccounts &&
root.sharedKeycardModule.keyPairHelper.accounts.count > 1) {
baseHeight = Constants.keycard.general.popupBiggerHeight
return Constants.keycard.general.popupBiggerHeight
}

if (root.fullScreenBottomSheet) {
return Math.max(baseHeight, content.implicitHeight)
}
if (root.fullScreenBottomSheet)
return content.implicitHeight

return baseHeight
return Constants.keycard.general.popupHeight
}

sharedKeycardModule: root.sharedKeycardModule
Expand Down
3 changes: 1 addition & 2 deletions ui/imports/shared/popups/keycard/KeycardPopupContent.qml
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,8 @@ Control {
implicitHeight: loader.implicitHeight
implicitWidth: loader.implicitWidth

Loader {
contentItem: Loader {
id: loader
anchors.fill: parent
sourceComponent: {
switch (root.sharedKeycardModule.currentState.stateType) {
case Constants.keycardSharedState.keycardFlowStarted:
Expand Down
Loading