This repository has been archived on 2023-11-19. You can view files and clone it, but cannot push or open issues or pull requests.
goober-bb10/assets/ThreadPage.qml
2016-10-21 16:53:19 -07:00

47 lines
1.2 KiB
QML

import bb.cascades 1.4
Page {
signal follow(string uid)
signal unfollow(string uid)
signal block(string uid)
signal unblock(string uid)
signal mute(string uid)
signal unmute(string uid)
Container {
ListView {
id: threadView
dataModel: ArrayDataModel {
id: threadModel
}
listItemComponents: [
ListItemComponent {
id: root
PostItem {}
}
]
function sendReply(text, pid) {
pnut.sendReply(text, pid);
}
function getUserName() {
return _app.setting("username")
}
function viewProfile(userobj) {
var page = profilePage.createObject();
page.user = userobj
page.follow.connect(follow)
page.unfollow.connect(unfollow)
page.block.connect(block)
page.unblock.connect(unblock)
page.mute.connect(mute)
page.unmute.connect(unmute)
nav.push(page);
}
}
}
function loadThread(data) {
threadModel.append(data);
}
}