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
1 change: 0 additions & 1 deletion app/api/server/v1/users.js
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,6 @@ API.v1.addRoute('users.setPreferences', { authRequired: true }, {
hideAvatars: Match.Maybe(Boolean),
hideFlexTab: Match.Maybe(Boolean),
sendOnEnter: Match.Maybe(String),
roomCounterSidebar: Match.Maybe(Boolean),
language: Match.Maybe(String),
sidebarShowFavorites: Match.Optional(Boolean),
sidebarShowUnread: Match.Optional(Boolean),
Expand Down
5 changes: 0 additions & 5 deletions app/lib/server/startup/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -427,11 +427,6 @@ settings.addGroup('Accounts', function() {
public: true,
i18nLabel: 'Email_Notification_Mode',
});
this.add('Accounts_Default_User_Preferences_roomCounterSidebar', false, {
type: 'boolean',
public: true,
i18nLabel: 'Show_room_counter_on_sidebar',
});
this.add('Accounts_Default_User_Preferences_newRoomNotification', 'door', {
type: 'select',
values: [
Expand Down
8 changes: 0 additions & 8 deletions app/ui-account/client/accountPreferences.html
Original file line number Diff line number Diff line change
Expand Up @@ -285,14 +285,6 @@ <h1>{{_ "Messages"}}</h1>
<div class="section">
<h1>{{_ "Sidebar"}}</h1>
<div class="section-content border-component-color">
<div class="input-line double-col" id="roomCounterSidebar">
<label class="setting-label">{{_ "Show_room_counter_on_sidebar"}}</label>
<div class="setting-field">
<label><input type="radio" name="roomCounterSidebar" value="true" checked="{{checked 'roomCounterSidebar' true}}"/> {{_ "True"}}</label>
<label><input type="radio" name="roomCounterSidebar" value="false" checked="{{checked 'roomCounterSidebar' false}}"/> {{_ "False"}}</label>
</div>
</div>

<div class="input-line double-col" id="sidebarShowDiscussion">
<label class="setting-label">{{_ "Group_discussions"}}</label>
<div>
Expand Down
1 change: 0 additions & 1 deletion app/ui-account/client/accountPreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,6 @@ Template.accountPreferences.onCreated(function() {
data.unreadAlert = JSON.parse($('#unreadAlert').find('input:checked').val());
data.sidebarShowDiscussion = JSON.parse($('#sidebarShowDiscussion').find('input:checked').val());
data.notificationsSoundVolume = parseInt($('#notificationsSoundVolume').val());
data.roomCounterSidebar = JSON.parse($('#roomCounterSidebar').find('input:checked').val());
data.highlights = _.compact(_.map($('[name=highlights]').val().split(/,|\n/), function(e) {
return s.trim(e);
}));
Expand Down
7 changes: 0 additions & 7 deletions app/ui-sidenav/client/roomList.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,6 @@
{{#if shouldAppear .. .}}
<h3 class="rooms-list__type">
<span class="rooms-list__type-text">{{_ ../label}}</span>
{{#if showRoomCounter}}
{{#with count}}
{{#if .}}
<span class="badge">{{.}}</span>
{{/if}}
{{/with}}
{{/if}}
</h3>
<ul class="rooms-list__list {{ roomType ..}}">
{{#each room in this}}
Expand Down
4 changes: 0 additions & 4 deletions app/ui-sidenav/client/roomList.js
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,6 @@ Template.roomList.helpers({
}
return roomTypes.roomTypes[instance.data.identifier].getUiText(UiTextContext.NO_ROOMS_SUBSCRIBED) || 'No_channels_yet';
},

showRoomCounter() {
return getUserPreference(Meteor.userId(), 'roomCounterSidebar');
},
});

const getLowerCaseNames = (room, nameDefault = '', fnameDefault = '') => {
Expand Down
1 change: 0 additions & 1 deletion server/methods/saveUserPreferences.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ Meteor.methods({
hideAvatars: Match.Optional(Boolean),
hideFlexTab: Match.Optional(Boolean),
sendOnEnter: Match.Optional(String),
roomCounterSidebar: Match.Optional(Boolean),
idleTimeLimit: Match.Optional(Number),
sidebarShowFavorites: Match.Optional(Boolean),
sidebarShowUnread: Match.Optional(Boolean),
Expand Down
1 change: 1 addition & 0 deletions server/startup/migrations/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,4 +168,5 @@ import './v167';
import './v168';
import './v169';
import './v170';
import './v171';
import './xrun';
28 changes: 28 additions & 0 deletions server/startup/migrations/v171.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
import {
Migrations,
} from '../../../app/migrations';
import {
Users,
Settings,
} from '../../../app/models';


Migrations.add({
version: 171,
up() {
Settings.remove({ _id: 'Accounts_Default_User_Preferences_roomCounterSidebar' });
return Users.update(
Comment thread
gabriellsh marked this conversation as resolved.
{
'settings.preferences.roomCounterSidebar': {
$exists: true,
},
}, {
$unset: {
'settings.preferences.roomCounterSidebar': 1,
},
}, {
multi: true,
},
);
},
});
1 change: 0 additions & 1 deletion tests/data/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,5 @@ export const preferences = {
hideAvatars: false,
hideFlexTab: false,
sendOnEnter: 'normal',
roomCounterSidebar: false,
},
};
1 change: 0 additions & 1 deletion tests/end-to-end/api/00-miscellaneous.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ describe('miscellaneous', function() {
'hideAvatars',
'hideFlexTab',
'sendOnEnter',
'roomCounterSidebar',
'idleTimeLimit',
'sidebarShowFavorites',
'sidebarShowUnread',
Expand Down
9 changes: 0 additions & 9 deletions tests/end-to-end/ui/11-admin.js
Original file line number Diff line number Diff line change
Expand Up @@ -871,15 +871,6 @@ describe('[Administration]', () => {
it('the offline email notification field value should be all', () => {
admin.accountsEmailNotificationMode.getValue().should.equal('mentions');
});

it('it should show the room counter sidebar field', () => {
admin.accountsRoomCounterSidebar.$('..').scroll();
admin.accountsRoomCounterSidebar.$('..').isVisible().should.be.true;
});
it('the room counter sidebar field value should be false', () => {
admin.accountsRoomCounterSidebar.isSelected().should.be.false;
});

it('it should show the new room notification field', () => {
admin.accountsNewRoomNotification.click();
admin.accountsNewRoomNotification.isVisible().should.be.true;
Expand Down
4 changes: 0 additions & 4 deletions tests/pageobjects/administration.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -303,10 +303,6 @@ class Administration extends Page {

get accountsEmailNotificationModeReset() { return browser.element('[data-qa-reset-setting-id="Accounts_Default_User_Preferences_emailNotificationMode"]'); }

get accountsRoomCounterSidebar() { return browser.element('[data-qa-setting-id="Accounts_Default_User_Preferences_roomCounterSidebar"]'); }

get accountsRoomCounterSidebarReset() { return browser.element('[data-qa-reset-setting-id="Accounts_Default_User_Preferences_roomCounterSidebar"]'); }

get accountsNewRoomNotification() { return browser.element('[data-qa-setting-id="Accounts_Default_User_Preferences_newRoomNotification"]'); }

get accountsNewRoomNotificationReset() { return browser.element('[data-qa-reset-setting-id="Accounts_Default_User_Preferences_newRoomNotification"]'); }
Expand Down