Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion app/theme/client/imports/components/sidebar/sidebar.css
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
}

& .unread-rooms {
display: none;
padding: calc(var(--sidebar-small-default-padding) - 8px);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are those 8 pixels? scrollbar?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the .sidebar-item has 3px padding top and the total height is 34px (base on var(--sidebar-item-height-medium)).
So I put the default padding there plus 8px to equal the sidebar-item


text-align: center;
}
}

Expand Down
2 changes: 2 additions & 0 deletions app/ui-utils/client/lib/RoomManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import _ from 'underscore';
import { fireGlobalEvent } from './fireGlobalEvent';
import { upsertMessage, RoomHistoryManager } from './RoomHistoryManager';
import { mainReady } from './mainReady';
import { menu } from './menu';
import { roomTypes } from '../../../utils';
import { callbacks } from '../../../callbacks';
import { Notifications } from '../../../notifications';
Expand Down Expand Up @@ -86,6 +87,7 @@ export const RoomManager = new function() {
name,
};
if (isNew) {
menu.updateUnreadBars();
callbacks.run('streamNewMessage', msg);
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/ui-utils/client/lib/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const menu = new class extends EventEmitter {
const listHeight = this.list.height();
let showTop = false;
let showBottom = false;
$('li.has-alert').each(function() {
$('li.sidebar-item--unread').each(function() {
if ($(this).offset().top < listOffset.top - $(this).height()) {
showTop = true;
}
Expand Down