Simplify logic of hiding bufferline times
This commit is contained in:
parent
27134a7f3d
commit
effbaff804
@ -395,7 +395,7 @@ npm run build-electron-{windows, darwin, linux}</pre>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div id="bufferlines" class="favorite-font" ng-swipe-right="swipeRight()" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse ng-class="{'withnicklist': showNicklist, 'hideTime': !activeBuffer().showBufferLineTimes}" when-scrolled="infiniteScroll()" imgur-drop>
|
||||
<div id="bufferlines" class="favorite-font" ng-swipe-right="swipeRight()" ng-swipe-left="swipeLeft()" ng-swipe-disable-mouse ng-class="{'withnicklist': showNicklist, 'hideTime': activeBuffer().hideBufferLineTimes}" when-scrolled="infiniteScroll()" imgur-drop>
|
||||
<table>
|
||||
<tbody>
|
||||
<tr class="bufferline">
|
||||
|
12
js/models.js
12
js/models.js
@ -92,11 +92,7 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
|
||||
var bufferType = message.type;
|
||||
|
||||
// If type is undefined set it as other to avoid later errors
|
||||
var type = message.local_variables.type;
|
||||
if (!type) {
|
||||
type = 'other';
|
||||
}
|
||||
|
||||
var type = message.local_variables.type || 'other';
|
||||
var indent = (['channel', 'private'].indexOf(type) >= 0);
|
||||
|
||||
var plugin = message.local_variables.plugin;
|
||||
@ -104,8 +100,8 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
|
||||
|
||||
var pinned = message.local_variables.pinned === "true";
|
||||
|
||||
//hide timestamps for certain buffer types
|
||||
var showBufferLineTimes = type && type !== 'relay';
|
||||
// hide timestamps for certain buffer types
|
||||
var hideBufferLineTimes = type && type === 'relay';
|
||||
|
||||
// Server buffers have this "irc.server.freenode" naming schema, which
|
||||
// messes the sorting up. We need it to be "irc.freenode" instead.
|
||||
@ -374,7 +370,7 @@ models.service('models', ['$rootScope', '$filter', 'bufferResume', function($roo
|
||||
getHistoryDown: getHistoryDown,
|
||||
isNicklistEmpty: isNicklistEmpty,
|
||||
nicklistRequested: nicklistRequested,
|
||||
showBufferLineTimes: showBufferLineTimes,
|
||||
hideBufferLineTimes: hideBufferLineTimes,
|
||||
pinned: pinned,
|
||||
queryNicklist: queryNicklist,
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user