Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] Wrong room counter name #9013

Merged
merged 1 commit into from
Dec 5, 2017
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

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions packages/rocketchat-i18n/i18n/en.i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -1631,7 +1631,7 @@
"Should_be_a_URL_of_an_image": "Should be a URL of an image.",
"Should_exists_a_user_with_this_username": "The user must already exist.",
"Show_all": "Show All",
"Show_message_counter_on_sidebar": "Show message counter on sidebar",
"Show_room_counter_on_sidebar": "Show room counter on sidebar",
"Show_more": "Show more",
"show_offline_users": "show offline users",
"Show_on_registration_page": "Show on registration page",
Expand Down Expand Up @@ -2094,4 +2094,4 @@
"your_message_optional": "your message (optional)",
"Your_password_is_wrong": "Your password is wrong!",
"Your_push_was_sent_to_s_devices": "Your push was sent to %s devices"
}
}
2 changes: 1 addition & 1 deletion packages/rocketchat-livechat/app/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions packages/rocketchat-ui-account/client/accountPreferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,11 @@ <h1>{{_ "Messages"}}</h1>
<div class="section">
<h1>{{_ "Sidebar"}}</h1>
<div class="section-content border-component-color">
<div class="input-line double-col" id="messageCounterSidebar">
<label>{{_ "Show_message_counter_on_sidebar"}}</label>
<div class="input-line double-col" id="roomCounterSidebar">
<label>{{_ "Show_room_counter_on_sidebar"}}</label>
<div>
<label><input type="radio" name="messageCounterSidebar" value="1" checked="{{checked 'messageCounterSidebar' true}}"/> {{_ "True"}}</label>
<label><input type="radio" name="messageCounterSidebar" value="0" checked="{{checked 'messageCounterSidebar' false true}}"/> {{_ "False"}}</label>
<label><input type="radio" name="roomCounterSidebar" value="1" checked="{{checked 'roomCounterSidebar' true}}"/> {{_ "True"}}</label>
<label><input type="radio" name="roomCounterSidebar" value="0" checked="{{checked 'roomCounterSidebar' false true}}"/> {{_ "False"}}</label>
</div>
</div>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,7 @@ Template.accountPreferences.onCreated(function() {
data.unreadAlert = $('#unreadAlert').find('input:checked').val();
data.notificationsSoundVolume = parseInt($('#notificationsSoundVolume').val());

data.messageCounterSidebar = $('#messageCounterSidebar').find('input:checked').val();
data.roomCounterSidebar = $('#roomCounterSidebar').find('input:checked').val();

Meteor.call('saveUserPreferences', data, function(error, results) {
if (results) {
Expand Down
2 changes: 1 addition & 1 deletion packages/rocketchat-ui-sidenav/client/roomList.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
{{#if shouldAppear .. .}}
<h3 class="rooms-list__type">
<span class="rooms-list__type-text">{{_ ../label}}</span>
{{#if showCounter}}
{{#if showRoomCounter}}
{{#with count}}
{{#if .}}
<span class="badge">{{.}}</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/rocketchat-ui-sidenav/client/roomList.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,9 @@ Template.roomList.helpers({
return RocketChat.roomTypes.roomTypes[roomType].getUiText(UiTextContext.NO_ROOMS_SUBSCRIBED) || 'No_channels_yet';
},

showCounter() {
showRoomCounter() {
const user = Meteor.user();
return user && user.settings && user.settings.preferences && user.settings.preferences.messageCounterSidebar;
return user && user.settings && user.settings.preferences && user.settings.preferences.roomCounterSidebar;
}
});

Expand Down
2 changes: 1 addition & 1 deletion server/methods/saveUserPreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ Meteor.methods({
preferences.hideFlexTab = settings.hideFlexTab === '1';
preferences.highlights = settings.highlights;
preferences.sendOnEnter = settings.sendOnEnter;
preferences.messageCounterSidebar = settings.messageCounterSidebar === '1';
preferences.roomCounterSidebar = settings.roomCounterSidebar === '1';

RocketChat.models.Users.setPreferences(Meteor.userId(), preferences);

Expand Down