Skip to content

Commit

Permalink
便乗リアクションの履歴が重複するのを修正 Fix #4618
Browse files Browse the repository at this point in the history
  • Loading branch information
mei23 committed Jun 1, 2023
1 parent 4238611 commit 2db7569
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,10 @@ export default Vue.extend({
},
addRecent(reaction: any) {
// add history
const _reaction = reaction.replace('@.', '');
let recents = this.$store.state.device.recentReactions || [];
recents = recents.filter((x: string) => x !== reaction);
recents.unshift(reaction.replace('@.', ''));
recents = recents.filter((x: string) => x !== _reaction);
recents.unshift(_reaction);
this.$store.commit('device/set', { key: 'recentReactions', value: recents.splice(0, this.$store.state.device.recentReactionsCount) });
},
onMouseover() {
Expand Down

0 comments on commit 2db7569

Please sign in to comment.