Clean up buffer model a bit
* use type local variable to determine whether to indent * local_variables is not used, don't export/save it
This commit is contained in:
parent
64af1f357c
commit
abfa26d6ed
1 changed files with 2 additions and 3 deletions
|
@ -15,7 +15,6 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
var title = message.title;
|
var title = message.title;
|
||||||
var number = message.number;
|
var number = message.number;
|
||||||
var pointer = message.pointers[0];
|
var pointer = message.pointers[0];
|
||||||
var local_variables = message.local_vars;
|
|
||||||
var notify = 3; // Default 3 == message
|
var notify = 3; // Default 3 == message
|
||||||
var lines = [];
|
var lines = [];
|
||||||
var requestedLines = 0;
|
var requestedLines = 0;
|
||||||
|
@ -28,7 +27,8 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
var unread = 0;
|
var unread = 0;
|
||||||
var lastSeen = -1;
|
var lastSeen = -1;
|
||||||
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
|
var serverSortKey = fullName.replace(/^irc.server.(\w+)/, "irc.$1");
|
||||||
var indent = (fullName.match(/^irc./) && !fullName.match(/^irc.server./));
|
var type = message.local_variables.type;
|
||||||
|
var indent = (['channel', 'private'].indexOf(type) >= 0);
|
||||||
|
|
||||||
// Buffer opened message does not include notify level
|
// Buffer opened message does not include notify level
|
||||||
if (message.notify !== undefined) {
|
if (message.notify !== undefined) {
|
||||||
|
@ -223,7 +223,6 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter)
|
||||||
lastSeen: lastSeen,
|
lastSeen: lastSeen,
|
||||||
unread: unread,
|
unread: unread,
|
||||||
notification: notification,
|
notification: notification,
|
||||||
localvars: local_variables,
|
|
||||||
notify: notify,
|
notify: notify,
|
||||||
nicklist: nicklist,
|
nicklist: nicklist,
|
||||||
addNick: addNick,
|
addNick: addNick,
|
||||||
|
|
Loading…
Reference in a new issue