diff --git a/kolibri/plugins/device/assets/src/views/taskNotificationMixin.js b/kolibri/plugins/device/assets/src/views/taskNotificationMixin.js index 3c5aa81cfee..04f38c8de14 100644 --- a/kolibri/plugins/device/assets/src/views/taskNotificationMixin.js +++ b/kolibri/plugins/device/assets/src/views/taskNotificationMixin.js @@ -25,16 +25,14 @@ const TaskSnackbarStrings = createTranslator('TaskSnackbarStrings', { }, }); +const { createSnackbar } = useSnackbar(); + export default { data() { return { showSnackbarWhenTaskHasFinished: true, }; }, - setup() { - const { createSnackbar } = useSnackbar(); - return { createSnackbar }; - }, computed: { watchedTaskId() { return this.$store.state.manageContent.watchedTaskId; @@ -65,16 +63,16 @@ export default { this.$router.push({ name: PageNames.MANAGE_TASKS }); }, createTaskFailedSnackbar() { - this.createSnackbar(TaskSnackbarStrings.$tr('taskFailed')); + createSnackbar(TaskSnackbarStrings.$tr('taskFailed')); }, createTaskFinishedSnackbar() { - this.createSnackbar({ + createSnackbar({ text: TaskSnackbarStrings.$tr('taskFinished'), autoDismiss: true, }); }, createTaskStartedSnackbar() { - this.createSnackbar({ + createSnackbar({ text: TaskSnackbarStrings.$tr('taskStarted'), autoDismiss: true, });