Start moving webapp to Redux (#6140)
* Start moving webapp to Redux * Fix localforage import * Updates per feedback * Feedback udpates and a few fixes * Minor updates * Fix statuses, config not loading properly, getMe sanitizing too much * Fix preferences * Fix user autocomplete * Fix sessions and audits * Fix error handling for all redux actions * Use new directory structure for components and containers * Refresh immediately on logout instead of after timeout * Add fetch polyfill
Этот коммит содержится в:
коммит произвёл
Christopher Speller
родитель
cc07c00507
Коммит
6c4c706313
@@ -127,14 +127,14 @@ export default class AtMentionProvider extends Provider {
|
||||
return;
|
||||
}
|
||||
|
||||
const members = data.in_channel;
|
||||
const members = Object.assign([], data.users);
|
||||
for (const id of Object.keys(members)) {
|
||||
members[id].type = Constants.MENTION_MEMBERS;
|
||||
members[id] = {...members[id], type: Constants.MENTION_MEMBERS};
|
||||
}
|
||||
|
||||
const nonmembers = data.out_of_channel;
|
||||
const nonmembers = data.out_of_channel || [];
|
||||
for (const id of Object.keys(nonmembers)) {
|
||||
nonmembers[id].type = Constants.MENTION_NONMEMBERS;
|
||||
nonmembers[id] = {...nonmembers[id], type: Constants.MENTION_NONMEMBERS};
|
||||
}
|
||||
|
||||
let specialMentions = [];
|
||||
|
||||
@@ -72,7 +72,7 @@ export default class SearchUserProvider extends Provider {
|
||||
return;
|
||||
}
|
||||
|
||||
const users = data.in_team;
|
||||
const users = Object.assign([], data.users);
|
||||
const mentions = users.map((user) => user.username);
|
||||
|
||||
AppDispatcher.handleServerAction({
|
||||
|
||||
@@ -67,7 +67,9 @@ export default class SwitchChannelProvider extends Provider {
|
||||
|
||||
autocompleteUsers(
|
||||
channelPrefix,
|
||||
(users) => {
|
||||
(data) => {
|
||||
const users = Object.assign([], data.users);
|
||||
|
||||
if (this.shouldCancelDispatch(channelPrefix)) {
|
||||
return;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user