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