Skip to content

Commit

Permalink
fix: adjust to changed counter bubble behavior
Browse files Browse the repository at this point in the history
Signed-off-by: Raimund Schlüßler <[email protected]>
  • Loading branch information
raimund-schluessler committed Jan 14, 2025
1 parent 5d75d0e commit b015993
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 37 deletions.
19 changes: 1 addition & 18 deletions src/components/AppNavigation/ListItemCalendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
</NcActions>
<NcAvatar v-if="calendar.isSharedWithMe && loadedOwnerPrincipal" :user="ownerUserId" :display-name="ownerDisplayname" />
<div v-if="calendar.isSharedWithMe && !loadedOwnerPrincipal" class="icon icon-loading" />
<NcCounterBubble v-if="calendarCount">
{{ counterFormatter(calendarCount) }}
</NcCounterBubble>
<NcCounterBubble v-if="calendarCount" :count="calendarCount" />
</template>

<template v-if="!deleteTimeout" #actions>
Expand Down Expand Up @@ -298,21 +296,6 @@ export default {
'moveTask',
]),

/**
* Format the task counter
*
* @param {number} count The number of tasks
*/
counterFormatter(count) {
switch (false) {
case count !== 0:
return ''
case count < 999:
return '999+'
default:
return count
}
},
/**
* Handle the drag over
*
Expand Down
20 changes: 1 addition & 19 deletions src/views/AppNavigation.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,7 @@ License along with this library. If not, see <http://www.gnu.org/licenses/>.
:size="20" />
</template>
<template #counter>
<NcCounterBubble v-show="collectionCount(collection.id)">
{{ counterFormatter(collectionCount(collection.id)) }}
</NcCounterBubble>
<NcCounterBubble v-show="collectionCount(collection.id)" :count="collectionCount(collection.id)" />
</template>
</NcAppNavigationItem>
<Sortable class="draggable-container"
Expand Down Expand Up @@ -186,22 +184,6 @@ export default {
'setCalendarOrder',
]),

/**
* Format the task counter
*
* @param {number} count The number of tasks
*/
counterFormatter(count) {
switch (false) {
case count !== 0:
return ''
case count < 999:
return '999+'
default:
return count
}
},

/**
* Indicate that we drag a calendar item
*
Expand Down

0 comments on commit b015993

Please sign in to comment.