Added user interface for lastN (only peers in lastN are visible, others stay in HiddenPeers component)
This commit is contained in:
@@ -9,7 +9,7 @@ const initialState =
|
||||
toolbarsVisible : true,
|
||||
mode : 'democratic',
|
||||
selectedPeerName : null,
|
||||
lastN : null
|
||||
lastN : []
|
||||
};
|
||||
|
||||
const room = (state = initialState, action) =>
|
||||
|
||||
@@ -19,6 +19,22 @@ const toolarea = (state = initialState, action) =>
|
||||
return { ...state, toolAreaOpen, unreadMessages, unreadFiles };
|
||||
}
|
||||
|
||||
case 'OPEN_TOOL_AREA':
|
||||
{
|
||||
const toolAreaOpen = true;
|
||||
const unreadMessages = state.currentToolTab === 'chat' ? 0 : state.unreadMessages;
|
||||
const unreadFiles = state.currentToolTab === 'files' ? 0 : state.unreadFiles;
|
||||
|
||||
return { ...state, toolAreaOpen, unreadMessages, unreadFiles };
|
||||
}
|
||||
|
||||
case 'CLOSE_TOOL_AREA':
|
||||
{
|
||||
const toolAreaOpen = false;
|
||||
|
||||
return { ...state, toolAreaOpen };
|
||||
}
|
||||
|
||||
case 'SET_TOOL_TAB':
|
||||
{
|
||||
const { toolTab } = action.payload;
|
||||
@@ -30,7 +46,7 @@ const toolarea = (state = initialState, action) =>
|
||||
|
||||
case 'ADD_NEW_RESPONSE_MESSAGE':
|
||||
{
|
||||
if (state.toolAreaOpen && state.currentToolTab === 'chat')
|
||||
if (state.toolAreaOpen && state.currentToolTab === 'chat')
|
||||
{
|
||||
return state;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user