Report modal style fix, chat updates, statusserializer revert, display name truncation
This commit is contained in:
mgabdev
2020-12-20 12:27:24 -05:00
parent 7ec426e3d8
commit 67eb9d5890
49 changed files with 369 additions and 158 deletions

View File

@@ -0,0 +1,26 @@
import { SETTING_CHANGE, SETTING_SAVE } from '../actions/settings'
import {
CHAT_SETTING_CHANGE,
CHAT_SETTING_SAVE,
} from '../actions/chat_settings'
import { Map as ImmutableMap, List as ImmutableList, fromJS } from 'immutable'
import uuid from '../utils/uuid'
const initialState = ImmutableMap({
saved: false,
restrict_non_followers: true,
show_active: false,
read_receipts: false,
sounds: true,
})
export default function chat_settings(state = initialState, action) {
switch(action.type) {
case CHAT_SETTING_CHANGE:
return state
.setIn(action.path, action.value)
.set('saved', false)
default:
return state
}
}

View File

@@ -9,6 +9,7 @@ import chat_conversation_lists from './chat_conversation_lists'
import chat_conversation_messages from './chat_conversation_messages'
import chat_conversations from './chat_conversations'
import chat_messages from './chat_messages'
import chat_settings from './chat_settings'
import compose from './compose'
import contexts from './contexts'
import custom_emojis from './custom_emojis'
@@ -60,6 +61,7 @@ const reducers = {
chat_conversation_messages,
chat_conversations,
chat_messages,
chat_settings,
compose,
contexts,
custom_emojis,

View File

@@ -14,7 +14,6 @@ const initialState = ImmutableList([])
export default function toasts(state = initialState, action) {
switch(action.type) {
case TOAST_SHOW:
console.log("action:", action)
return state.set(state.size, ImmutableMap({
key: state.size > 0 ? state.last().get('key') + 1 : 0,
message: makeMessageFromData(action.toastData),