Move wrapWidth handling out of MessageBox, improve scroll position handling, use custom routing, close menu when clicking anywhere

This commit is contained in:
Ken-Håvard Lieng 2017-05-07 22:19:15 +02:00
parent a753efd1dd
commit fec7c93abc
24 changed files with 363 additions and 235 deletions

View file

@ -121,6 +121,7 @@ export function addMessages(messages, server, to, prepend, next) {
if (next) {
messages[0].id = next;
messages[0].next = true;
}
messages.forEach(message => initMessage(message, server, message.tab || tab, state));

View file

@ -1,14 +1,10 @@
import { push, replace } from 'react-router-redux';
import * as actions from '../actions';
import { push, replace } from '../util/router';
export function select(server, name) {
const pm = name && name.charAt(0) !== '#';
if (pm) {
return push(`/${server}/pm/${name}`);
} else if (name) {
if (name) {
return push(`/${server}/${encodeURIComponent(name)}`);
}
return push(`/${server}`);
}