mirror of
https://github.com/HabitRPG/habitica.git
synced 2025-12-17 06:37:23 +01:00
antidote display and functionality (#10199)
* update antidote display and functionality - fixes #9758 and #10160 update antidote display and functionality - fixes #9758 and #10160 update antidote display and functionality - fixes #9758 and #10160 update antidote display and functionality - fixes #9758 and #10160 * clean up / refactor * prevent unpin of all items which don't have a pinType * remove the double boolean casting / fix lint
This commit is contained in:
@@ -620,6 +620,11 @@ export default {
|
||||
}
|
||||
},
|
||||
togglePinned (item) {
|
||||
if (!item.pinType) {
|
||||
this.error(this.$t('errorTemporaryItem'));
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
if (!this.$store.dispatch('user:togglePinnedItem', {type: item.pinType, path: item.path})) {
|
||||
this.text(this.$t('unpinnedItem', {item: item.text}));
|
||||
|
||||
Reference in New Issue
Block a user