47 lines
1.2 KiB
QML
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);
|
|
}
|
|
}
|