indicate & disable deleted posts
This commit is contained in:
parent
7306635fc6
commit
f61584a526
4 changed files with 41 additions and 25 deletions
|
@ -32,6 +32,9 @@ Container {
|
||||||
|
|
||||||
property variant theme : Application.themeSupport.theme.colorTheme.style
|
property variant theme : Application.themeSupport.theme.colorTheme.style
|
||||||
|
|
||||||
|
enabled: (ListItemData.is_deleted) ? false : true
|
||||||
|
opacity: (ListItemData.is_deleted) ? 0.5 : 1.0
|
||||||
|
|
||||||
Container {
|
Container {
|
||||||
layout: DockLayout {}
|
layout: DockLayout {}
|
||||||
horizontalAlignment: HorizontalAlignment.Fill
|
horizontalAlignment: HorizontalAlignment.Fill
|
||||||
|
@ -132,7 +135,7 @@ Container {
|
||||||
topMargin: ui.sdu(2.0)
|
topMargin: ui.sdu(2.0)
|
||||||
bottomMargin: ui.sdu(2.0)
|
bottomMargin: ui.sdu(2.0)
|
||||||
Label {
|
Label {
|
||||||
text: ListItemData.content.html
|
text: (ListItemData.is_deleted) ? qsTr("<i>{{POST DELETED}}</i>") : ListItemData.content.html
|
||||||
multiline: true
|
multiline: true
|
||||||
textFormat: TextFormat.Html
|
textFormat: TextFormat.Html
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,16 +57,18 @@ NavigationPane {
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
onTriggered: {
|
onTriggered: {
|
||||||
var page = threadPage.createObject();
|
if (!postModel.data(indexPath).is_deleted) {
|
||||||
pnut.threadReceived.connect(page.loadThread);
|
var page = threadPage.createObject();
|
||||||
pnut.getThread(postModel.data(indexPath).thread_id);
|
pnut.threadReceived.connect(page.loadThread);
|
||||||
page.follow.connect(pnut.followUser)
|
pnut.getThread(postModel.data(indexPath).thread_id);
|
||||||
page.unfollow.connect(pnut.unfollowUser)
|
page.follow.connect(pnut.followUser)
|
||||||
page.block.connect(pnut.blockUser)
|
page.unfollow.connect(pnut.unfollowUser)
|
||||||
page.unblock.connect(pnut.unblockUser)
|
page.block.connect(pnut.blockUser)
|
||||||
page.mute.connect(pnut.muteUser)
|
page.unblock.connect(pnut.unblockUser)
|
||||||
page.unmute.connect(pnut.unmuteUser)
|
page.mute.connect(pnut.muteUser)
|
||||||
nav.push(page);
|
page.unmute.connect(pnut.unmuteUser)
|
||||||
|
nav.push(page);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
function viewProfile(userobj) {
|
function viewProfile(userobj) {
|
||||||
var page = profilePage.createObject();
|
var page = profilePage.createObject();
|
||||||
|
@ -204,7 +206,13 @@ NavigationPane {
|
||||||
id: pnut
|
id: pnut
|
||||||
|
|
||||||
onStreamReceived: {
|
onStreamReceived: {
|
||||||
//nav.parent.unreadContentCount = stream.length
|
|
||||||
|
stream.forEach(function(post) {
|
||||||
|
if (post.is_deleted) {
|
||||||
|
console.log("got a deleted post")
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
switch (rtype) {
|
switch (rtype) {
|
||||||
case Pnut.STREAM_OLDER:
|
case Pnut.STREAM_OLDER:
|
||||||
//streamView.scrollToPosition(ScrollPosition.End, ScrollAnimation.None);
|
//streamView.scrollToPosition(ScrollPosition.End, ScrollAnimation.None);
|
||||||
|
|
2
buildnum
2
buildnum
|
@ -1 +1 @@
|
||||||
203
|
209
|
|
@ -30,42 +30,47 @@
|
||||||
<context>
|
<context>
|
||||||
<name>PostItem</name>
|
<name>PostItem</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="165"/>
|
<location filename="../assets/PostItem.qml" line="138"/>
|
||||||
|
<source><i>{{POST DELETED}}</i></source>
|
||||||
|
<translation type="unfinished"></translation>
|
||||||
|
</message>
|
||||||
|
<message>
|
||||||
|
<location filename="../assets/PostItem.qml" line="168"/>
|
||||||
<source>Reply</source>
|
<source>Reply</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="174"/>
|
<location filename="../assets/PostItem.qml" line="177"/>
|
||||||
<source>Reply All</source>
|
<source>Reply All</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="184"/>
|
<location filename="../assets/PostItem.qml" line="187"/>
|
||||||
<source>Add Bookmark</source>
|
<source>Add Bookmark</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="184"/>
|
<location filename="../assets/PostItem.qml" line="187"/>
|
||||||
<source>Delete Bookmark</source>
|
<source>Delete Bookmark</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="195"/>
|
<location filename="../assets/PostItem.qml" line="198"/>
|
||||||
<source>Repost</source>
|
<source>Repost</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="195"/>
|
<location filename="../assets/PostItem.qml" line="198"/>
|
||||||
<source>Delete Repost</source>
|
<source>Delete Repost</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="206"/>
|
<location filename="../assets/PostItem.qml" line="209"/>
|
||||||
<source>Quote</source>
|
<source>Quote</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/PostItem.qml" line="215"/>
|
<location filename="../assets/PostItem.qml" line="218"/>
|
||||||
<source>View Profile</source>
|
<source>View Profile</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
@ -152,22 +157,22 @@
|
||||||
<context>
|
<context>
|
||||||
<name>StreamTab</name>
|
<name>StreamTab</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/StreamTab.qml" line="121"/>
|
<location filename="../assets/StreamTab.qml" line="123"/>
|
||||||
<source>New Post</source>
|
<source>New Post</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/StreamTab.qml" line="135"/>
|
<location filename="../assets/StreamTab.qml" line="137"/>
|
||||||
<source>To Top</source>
|
<source>To Top</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/StreamTab.qml" line="163"/>
|
<location filename="../assets/StreamTab.qml" line="165"/>
|
||||||
<source>To Bottom</source>
|
<source>To Bottom</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../assets/StreamTab.qml" line="150"/>
|
<location filename="../assets/StreamTab.qml" line="152"/>
|
||||||
<source>Reload</source>
|
<source>Reload</source>
|
||||||
<translation type="unfinished"></translation>
|
<translation type="unfinished"></translation>
|
||||||
</message>
|
</message>
|
||||||
|
|
Reference in a new issue