parent
cd5eb42c0b
commit
5108f6db2b
|
@ -53,8 +53,12 @@ StatusSectionLayout {
|
|||
|
||||
readonly property bool searchMode: searcher.text.length > 0
|
||||
|
||||
function navigateToCommunity(communityId) {
|
||||
root.communitiesStore.setActiveCommunity(communityId)
|
||||
function navigateToCommunity(communityId: string, joined: bool) {
|
||||
if (joined) {
|
||||
root.communitiesStore.setActiveCommunity(communityId)
|
||||
} else {
|
||||
root.communitiesStore.spectateCommunity(communityId)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -161,7 +165,7 @@ StatusSectionLayout {
|
|||
model: searchModel
|
||||
searchLayout: d.searchMode
|
||||
|
||||
onCardClicked: d.navigateToCommunity(communityId)
|
||||
onCardClicked: d.navigateToCommunity(communityId, joined)
|
||||
}
|
||||
|
||||
StatusBaseText {
|
||||
|
|
|
@ -90,6 +90,10 @@ QtObject {
|
|||
mainModule.setActiveSectionById(communityId);
|
||||
}
|
||||
|
||||
function spectateCommunity(communityId: string) {
|
||||
communitiesModuleInst.spectateCommunity(communityId, userProfile.name)
|
||||
}
|
||||
|
||||
function setFileListItems(filePaths) {
|
||||
root.communitiesModuleInst.setFileListItems(filePaths)
|
||||
}
|
||||
|
|
|
@ -16,7 +16,7 @@ StatusScrollView {
|
|||
property var model
|
||||
property bool searchLayout: false
|
||||
|
||||
signal cardClicked(string communityId)
|
||||
signal cardClicked(communityId: string, joined: bool)
|
||||
|
||||
clip: false
|
||||
|
||||
|
@ -65,7 +65,7 @@ StatusScrollView {
|
|||
popularity: model.popularity
|
||||
// <out of scope> categories: model.categories
|
||||
|
||||
onClicked: root.cardClicked(communityId)
|
||||
onClicked: root.cardClicked(communityId, model.joined)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue