comm: fix name for the 'all' channel (it's not just 'public' COMM, but also alerts, system (aka 'full'), etc)

This commit is contained in:
Jon Atkins
2014-09-28 04:52:07 +01:00
parent 6da6cd2259
commit 2446060dad

View File

@ -433,7 +433,7 @@ window.chat.getActive = function() {
window.chat.tabToChannel = function(tab) { window.chat.tabToChannel = function(tab) {
if (tab == 'faction') return 'faction'; if (tab == 'faction') return 'faction';
if (tab == 'alerts') return 'alerts'; if (tab == 'alerts') return 'alerts';
return 'public'; //for 'full', 'compact' and 'public' return 'all'; //for 'full', 'compact' and 'public'
}; };
@ -458,11 +458,11 @@ window.chat.toggle = function() {
window.chat.request = function() { window.chat.request = function() {
console.log('refreshing chat'); console.log('refreshing chat');
var tab = chat.getActive(); var channel = chat.tabToChannel(chat.getActive());
//TODO: add 'alerts' tab, and add the matching case in here if (channel == 'faction') {
if (tab == 'faction') {
chat.requestFaction(false); chat.requestFaction(false);
} else { }
if (channel == 'all') {
// the 'public', 'full' and 'compact' tabs are all based off the 'public' COMM data // the 'public', 'full' and 'compact' tabs are all based off the 'public' COMM data
chat.requestPublic(false); chat.requestPublic(false);
} }
@ -506,7 +506,7 @@ window.chat.chooseAnchor = function(t) {
$("#chatcontrols a:contains('" + tt + "')").addClass('active'); $("#chatcontrols a:contains('" + tt + "')").addClass('active');
var newChannel = chat.tabToChannel(tt); var newChannel = chat.tabToChannel(tt);
if (newChannel != oldChannel) setTimeout(chat.request,1); if (newChannel != oldChannel) startRefreshTimeout(0.1*1000); //only chat uses the refresh timer stuff, so a perfect way of forcing an early refresh after a tab change
$('#chat > div').hide(); $('#chat > div').hide();