Fix badge logic and add notification when receiving files

master
Torjus 2018-07-30 15:05:20 +02:00
parent 3404950069
commit 6042d305ac
2 changed files with 8 additions and 3 deletions

View File

@ -1166,9 +1166,13 @@ export default class RoomClient
{
accept();
const { file } = request.data;
const payload = request.data.file;
this._dispatch(stateActions.addFile(file));
this._dispatch(stateActions.addFile(payload));
this._dispatch(requestActions.notify({
text: `${payload.name} shared a file`
}));
break;
}

View File

@ -14,8 +14,9 @@ const toolarea = (state = initialState, action) =>
{
const toolAreaOpen = !state.toolAreaOpen;
const unreadMessages = toolAreaOpen && state.currentToolTab === 'chat' ? 0 : state.unreadMessages;
const unreadFiles = toolAreaOpen && state.currentToolTab === 'files' ? 0 : state.unreadFiles;
return { ...state, toolAreaOpen, unreadMessages };
return { ...state, toolAreaOpen, unreadMessages, unreadFiles };
}
case 'SET_TOOL_TAB':