display channel suggestions in main channel list
This commit is contained in:
parent
a3441fb45f
commit
1d8d11a06e
|
@ -64,16 +64,19 @@ Item {
|
|||
anchors.topMargin: Style.current.padding
|
||||
|
||||
function getCurrentIndex() {
|
||||
return channelList.channelListCount > 0 ? 1 : 0
|
||||
// return channelList.channelListCount > 0 ? 1 : 0
|
||||
return 0
|
||||
}
|
||||
|
||||
currentIndex: getCurrentIndex()
|
||||
|
||||
EmptyView {
|
||||
onCloseButtonPressed: function () {
|
||||
contactsStackView.currentIndex = 2
|
||||
}
|
||||
}
|
||||
// ScrollView {
|
||||
// clip: true
|
||||
// EmptyView {
|
||||
// onCloseButtonPressed: function () {
|
||||
// contactsStackView.currentIndex = 2
|
||||
// }
|
||||
// }
|
||||
|
||||
ChannelList {
|
||||
id: channelList
|
||||
|
|
|
@ -4,6 +4,7 @@ import QtQuick.Layouts 1.13
|
|||
import "../../../../shared"
|
||||
import "../../../../imports"
|
||||
import "../components"
|
||||
import "./"
|
||||
|
||||
ScrollView {
|
||||
property alias channelListCount: chatGroupsListView.count
|
||||
|
@ -12,16 +13,34 @@ ScrollView {
|
|||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
contentHeight: {
|
||||
return itemId.height
|
||||
}
|
||||
clip: true
|
||||
|
||||
ListView {
|
||||
id: chatGroupsListView
|
||||
Item {
|
||||
id: itemId
|
||||
Layout.fillHeight: true
|
||||
anchors.top: parent.top
|
||||
anchors.bottom: parent.bottom
|
||||
// anchors.bottom: parent.bottom
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.leftMargin: Style.current.padding
|
||||
clip: true
|
||||
height: childrenRect.height
|
||||
|
||||
ListView {
|
||||
id: chatGroupsListView
|
||||
anchors.top: parent.top
|
||||
height: childrenRect.height
|
||||
// anchors.bottom: parent.bottom
|
||||
// anchors.bottom: chatGroupsListView2.top
|
||||
anchors.right: parent.right
|
||||
anchors.left: parent.left
|
||||
anchors.rightMargin: Style.current.padding
|
||||
anchors.leftMargin: Style.current.padding
|
||||
interactive: false
|
||||
// clip: true
|
||||
model: chatsModel.chats
|
||||
delegate: Channel {
|
||||
name: model.name
|
||||
|
@ -52,6 +71,15 @@ ScrollView {
|
|||
}
|
||||
}
|
||||
|
||||
EmptyView {
|
||||
width: parent.width
|
||||
// height: 500
|
||||
anchors.top: chatGroupsListView.bottom
|
||||
anchors.topMargin: 10
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
ProfilePopup {
|
||||
id: profilePopup
|
||||
height: 330
|
||||
|
|
|
@ -7,9 +7,8 @@ import "../data/channelList.js" as ChannelJSON
|
|||
import "../../../../shared"
|
||||
import "../../../../imports"
|
||||
|
||||
//Item {
|
||||
ScrollView {
|
||||
// id: sview
|
||||
Item {
|
||||
// ScrollView {
|
||||
clip: true
|
||||
|
||||
// anchors.top: suggestionsText.bottom
|
||||
|
@ -18,17 +17,20 @@ import "../../../../imports"
|
|||
// anchors.right: parent.right
|
||||
// anchors.bottom: parent.bottom
|
||||
|
||||
ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||
// ScrollBar.horizontal.policy: ScrollBar.AlwaysOff
|
||||
// ScrollBar.vertical.policy: ScrollBar.AlwaysOn
|
||||
// Layout.fillHeight: true
|
||||
// Layout.fillWidth: true
|
||||
|
||||
property var onCloseButtonPressed: function () {}
|
||||
|
||||
id: emptyView
|
||||
Layout.fillHeight: true
|
||||
Layout.fillWidth: true
|
||||
|
||||
contentHeight: {
|
||||
// contentHeight: {
|
||||
height: {
|
||||
if (!visible) return 0
|
||||
var totalHeight = 0
|
||||
for (let i = 0; i < sectionRepeater.count; i++) {
|
||||
totalHeight += sectionRepeater.itemAt(i).height + Style.current.padding
|
||||
|
@ -52,7 +54,7 @@ import "../../../../imports"
|
|||
|
||||
Item {
|
||||
id: inviteFriendsContainer
|
||||
height: 190
|
||||
height: visible ? 190 : 0
|
||||
anchors.top: parent.top
|
||||
anchors.topMargin: 0
|
||||
anchors.right: parent.right
|
||||
|
@ -88,7 +90,7 @@ import "../../../../imports"
|
|||
anchors.fill: closeImg
|
||||
cursorShape: Qt.PointingHandCursor
|
||||
onClicked: {
|
||||
emptyView.onCloseButtonPressed()
|
||||
emptyView.visible = false
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue