From abfa26d6eda7ee7077040fff6fc086c28ad81d85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCbschle-Schneider?= Date: Wed, 7 May 2014 18:58:59 +0100 Subject: [PATCH] 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 --- js/models.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/js/models.js b/js/models.js index 4fe75c5..fe3f7e8 100644 --- a/js/models.js +++ b/js/models.js @@ -15,7 +15,6 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) var title = message.title; var number = message.number; var pointer = message.pointers[0]; - var local_variables = message.local_vars; var notify = 3; // Default 3 == message var lines = []; var requestedLines = 0; @@ -28,7 +27,8 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) var unread = 0; var lastSeen = -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 if (message.notify !== undefined) { @@ -223,7 +223,6 @@ models.service('models', ['$rootScope', '$filter', function($rootScope, $filter) lastSeen: lastSeen, unread: unread, notification: notification, - localvars: local_variables, notify: notify, nicklist: nicklist, addNick: addNick,