<commit_before>import QtQuick 2.0
import Sailfish.Silica 1.0
import harbour.orn 1.0
import "../components"

Page {
    property alias appId: commentsModel.appId
    property alias commentField: commentsList.headerItem
    property int userId
    property string userName
    property bool hasComments: false
    property bool _hintMode: Storeman.showHint(Storeman.CommentDelegateHint)

    id: page
    allowedOrientations: defaultAllowedOrientations

    onStatusChanged: {
        // Wait until page loads to prevent lagging
        if (status === PageStatus.Active) {
            if (!_hintMode) {
                commentsList.model = commentsModel
            } else {
                var dcmComp = Qt.createComponent(Qt.resolvedUrl("../models/DummyCommentsModel.qml"))
                commentsList.model = dcmComp.createObject()

                var label = commentsList.currentItem.replyToLabel
                var halfSize = Theme.itemSizeLarge / 2

                var shComp = Qt.createComponent(Qt.resolvedUrl("../components/StoremanHint.qml"))
                var shObj = shComp.createObject(label, {
                                                    distance: 0.0,
                                                    startX: label.x + label.implicitWidth / 2 - halfSize,
                                                    startY: label.y + label.height / 2 - halfSize
                                                })

                var shlComp = Qt.createComponent(Qt.resolvedUrl("../components/StoremanHintLabel.qml"))
                var shlObj = shlComp.createObject(page, {
                                                      hint: shObj,
                                                      //% "Tap to navigate to the replied comment"
                                                      text: qsTrId("orn-hint-commentdelegate"),
                                                      invert: true
                                                  })

                shlObj.finished.connect(function() {
                    _hintMode = false
                    Storeman.setHintShowed(Storeman.CommentDelegateHint)
                    commentsList.model = commentsModel
                    shlObj.destroy()
                    shObj.destroy()
                })

                shObj.start()<commit_msg>Update comment delegate hint positioning<commit_after>import QtQuick 2.0
import Sailfish.Silica 1.0
import harbour.orn 1.0
import "../components"

Page {
    property alias appId: commentsModel.appId
    property alias commentField: commentsList.headerItem
    property int userId
    property string userName
    property bool hasComments: false
    property bool _hintMode: Storeman.showHint(Storeman.CommentDelegateHint)

    id: page
    allowedOrientations: defaultAllowedOrientations

    onStatusChanged: {
        // Wait until page loads to prevent lagging
        if (status === PageStatus.Active) {
            if (!_hintMode) {
                commentsList.model = commentsModel
            } else {
                var dcmComp = Qt.createComponent(Qt.resolvedUrl("../models/DummyCommentsModel.qml"))
                commentsList.model = dcmComp.createObject()

                var label = commentsList.currentItem.replyToLabel
                var shComp = Qt.createComponent(Qt.resolvedUrl("../components/StoremanHint.qml"))
                var shObj = shComp.createObject(label, {
                                                    distance: 0.0,
                                                    "anchors.centerIn": label
                                                })

                var shlComp = Qt.createComponent(Qt.resolvedUrl("../components/StoremanHintLabel.qml"))
                var shlObj = shlComp.createObject(page, {
                                                      hint: shObj,
                                                      //% "Tap to navigate to the replied comment"
                                                      text: qsTrId("orn-hint-commentdelegate"),
                                                      invert: true
                                                  })

                shlObj.finished.connect(function() {
                    _hintMode = false
                    Storeman.setHintShowed(Storeman.CommentDelegateHint)
                    commentsList.model = commentsModel
                    shlObj.destroy()
                    shObj.destroy()
                })

                shObj.start()
{'fraction_non_alphanumeric': 0.07182442917313234, 'fraction_numerical': 0.0042119264021281315, 'mean_word_length': 1.2347696879643388, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 34, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3737681', 'n_tokens_mistral': 1000, 'n_tokens_neox': 941, 'n_words': 215}