Revert obsolete changes to vuex store
This commit is contained in:
parent
ddff3ac162
commit
ef710a2631
@ -17,23 +17,7 @@ function detectDesktopNotificationState() {
|
||||
return "blocked";
|
||||
}
|
||||
|
||||
let store = null;
|
||||
|
||||
const setMessageNetworkChannel = (message) => {
|
||||
const channelAndNetwork = store.getters.findChannelOnNetwork(
|
||||
message.networkUuid,
|
||||
message.channelName
|
||||
);
|
||||
|
||||
if (channelAndNetwork) {
|
||||
message.network = channelAndNetwork.network;
|
||||
message.channel = channelAndNetwork.channel;
|
||||
}
|
||||
|
||||
return message;
|
||||
};
|
||||
|
||||
store = new Vuex.Store({
|
||||
const store = new Vuex.Store({
|
||||
state: {
|
||||
appLoaded: false,
|
||||
activeChannel: null,
|
||||
@ -135,23 +119,11 @@ store = new Vuex.Store({
|
||||
state.messageSearchInProgress = value;
|
||||
},
|
||||
messageSearchResults(state, value) {
|
||||
if (value) {
|
||||
// Set the search results and add networks and channels to messages
|
||||
state.messageSearchResults = {
|
||||
...value,
|
||||
...value.results.map(setMessageNetworkChannel),
|
||||
};
|
||||
return;
|
||||
}
|
||||
|
||||
state.messageSearchResults = value;
|
||||
},
|
||||
addMessageSearchResults(state, value) {
|
||||
// Append the search results and add networks and channels to new messages
|
||||
value.results = [
|
||||
...state.messageSearchResults.results,
|
||||
...value.results.map(setMessageNetworkChannel),
|
||||
];
|
||||
value.results = [...state.messageSearchResults.results, ...value.results];
|
||||
|
||||
state.messageSearchResults = value;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user