Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
nheko
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Nheko Reborn
nheko
Commits
eaddfb4f
Commit
eaddfb4f
authored
3 years ago
by
kamathmanu
Browse files
Options
Downloads
Patches
Plain Diff
Clean up final nits
parent
9ab12961
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
resources/qml/RoomDirectory.qml
+8
-9
8 additions, 9 deletions
resources/qml/RoomDirectory.qml
src/RoomDirectoryModel.cpp
+1
-3
1 addition, 3 deletions
src/RoomDirectoryModel.cpp
src/RoomDirectoryModel.h
+5
-2
5 additions, 2 deletions
src/RoomDirectoryModel.h
with
14 additions
and
14 deletions
resources/qml/RoomDirectory.qml
+
8
−
9
View file @
eaddfb4f
...
...
@@ -22,6 +22,7 @@ ApplicationWindow {
color
:
Nheko
.
colors
.
window
modality
:
Qt
.
WindowModal
flags
:
Qt
.
Dialog
|
Qt
.
WindowCloseButtonHint
Component.onCompleted
:
Nheko
.
reparent
(
roomDirectoryWindow
)
title
:
qsTr
(
"
Explore Public Rooms
"
)
Shortcut
{
...
...
@@ -35,6 +36,12 @@ ApplicationWindow {
anchors.fill
:
parent
model
:
publicRooms
ScrollHelper
{
flickable
:
parent
anchors.fill
:
parent
enabled
:
!
Settings
.
mobileMode
}
delegate
:
Rectangle
{
id
:
roomDirDelegate
...
...
@@ -44,7 +51,7 @@ ApplicationWindow {
property
int
avatarSize
:
fontMetrics
.
lineSpacing
*
4
color
:
background
height
:
avatarSize
+
2.5
*
Nheko
.
padding
Medium
height
:
avatarSize
+
Nheko
.
padding
Large
width
:
ListView
.
view
.
width
RowLayout
{
...
...
@@ -67,7 +74,6 @@ ApplicationWindow {
id
:
textContent
Layout.alignment
:
Qt
.
AlignLeft
Layout.fillWidth
:
true
width
:
parent
.
width
-
avatar
.
width
Layout.preferredWidth
:
parent
.
width
-
avatar
.
width
Layout.preferredHeight
:
roomNameRow
.
height
+
roomDescriptionRow
.
height
...
...
@@ -76,7 +82,6 @@ ApplicationWindow {
RowLayout
{
id
:
roomNameRow
Layout.fillWidth
:
true
spacing
:
0
ElidedLabel
{
...
...
@@ -92,7 +97,6 @@ ApplicationWindow {
RowLayout
{
id
:
roomDescriptionRow
Layout.fillWidth
:
true
Layout.preferredWidth
:
parent
.
width
spacing
:
Nheko
.
paddingSmall
Layout.alignment
:
Qt
.
AlignVCenter
|
Qt
.
AlignLeft
...
...
@@ -116,7 +120,6 @@ ApplicationWindow {
Item
{
id
:
numMembersRectangle
Layout.fillWidth
:
false
Layout.margins
:
Nheko
.
paddingSmall
width
:
roomCount
.
width
...
...
@@ -125,8 +128,6 @@ ApplicationWindow {
color
:
roomDirDelegate
.
unimportantText
anchors.centerIn
:
parent
Layout.fillWidth
:
false
font.weight
:
Font
.
Thin
font.pixelSize
:
fontMetrics
.
font
.
pixelSize
text
:
model
.
numMembers
.
toString
()
}
...
...
@@ -136,7 +137,6 @@ ApplicationWindow {
Item
{
id
:
buttonRectangle
Layout.fillWidth
:
false
Layout.margins
:
Nheko
.
paddingSmall
width
:
joinRoomButton
.
width
...
...
@@ -175,7 +175,6 @@ ApplicationWindow {
anchors.margins
:
Nheko
.
paddingLarge
running
:
visible
foreground
:
Nheko
.
colors
.
mid
z
:
7
}
}
...
...
This diff is collapsed.
Click to expand it.
src/RoomDirectoryModel.cpp
+
1
−
3
View file @
eaddfb4f
...
...
@@ -69,10 +69,8 @@ RoomDirectoryModel::setSearchTerm(const QString &f)
bool
RoomDirectoryModel
::
canJoinRoom
(
const
QByteArray
&
room
)
{
const
auto
&
cache
=
cache
::
roomInfo
();
const
QString
room_id
(
room
);
const
bool
validRoom
=
!
room_id
.
isNull
()
&&
!
room_id
.
isEmpty
();
return
validRoom
&&
!
cache
.
contains
(
room_id
);
return
!
room_id
.
isEmpty
()
&&
!
cache
::
getRoomInfo
({
room_id
.
toStdString
()}).
count
(
room_id
);
}
std
::
vector
<
std
::
string
>
...
...
This diff is collapsed.
Click to expand it.
src/RoomDirectoryModel.h
+
5
−
2
View file @
eaddfb4f
...
...
@@ -71,11 +71,14 @@ signals:
void
reachedEndOfPaginationChanged
();
public
slots
:
void
displayRooms
(
std
::
vector
<
mtx
::
responses
::
PublicRoomsChunk
>
rooms
,
const
std
::
string
&
next_batch
);
void
setMatrixServer
(
const
QString
&
s
=
""
);
void
setSearchTerm
(
const
QString
&
f
);
private
slots
:
void
displayRooms
(
std
::
vector
<
mtx
::
responses
::
PublicRoomsChunk
>
rooms
,
const
std
::
string
&
next_batch
);
private
:
static
constexpr
size_t
limit_
=
50
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment