Skip to content

Commit

Permalink
Fixes render issues from deactivated apps in DockState
Browse files Browse the repository at this point in the history
  • Loading branch information
Sohan Deshar authored and pschuele committed Dec 13, 2024
1 parent 66a8527 commit 54bf8ad
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions tine20/Tinebase/js/TineDock/TineDock.vue
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<script setup>
/* eslint-disable vue/no-mutating-props */
/* eslint-disable */
import {computed, ref, watch, inject, onMounted, onUpdated} from 'vue'
import {computed, ref, watch, inject, onMounted, onUpdated, onBeforeMount} from 'vue'
import {useScroll, useWindowSize} from '@vueuse/core'
import TMenu from "../vue/components/TMenu.vue";

Expand Down Expand Up @@ -124,7 +124,7 @@ const dockedAppsInternal = computed(() => {
return _.find(availableApps.value, availableApp => {
return availableApp.name === appName
})
})
}).filter(app => app)
: []
})

Expand Down Expand Up @@ -177,6 +177,12 @@ const dragEnd = () => {

// hiding the dock for small screen devices
const { width } = useWindowSize()
onBeforeMount(() => {
const diff = _.difference(props.state.dockedApps, dockedAppsInternal.value.map(el => el.name))
if (diff.length) {
_.remove(props.state.dockedApps, (app) => diff.includes(app))
}
})
onMounted(() => {
const t = Tine.Tinebase.MainScreen.getDock()
if(width.value <= 500){
Expand Down

0 comments on commit 54bf8ad

Please sign in to comment.