fix: cap index to len of pinned when inserting dnd icon

This commit is contained in:
Ashley Wulber 2024-07-22 13:51:11 -04:00 committed by Ashley Wulber
parent 481573ec27
commit c6291c7c09

View file

@ -1484,7 +1484,7 @@ impl cosmic::Application for CosmicAppList {
.and_then(|o| o.dock_item.as_ref().map(|item| (item, o.preview_index)))
{
favorites.insert(
index,
index.min(favorites.len()),
item.as_icon(
&self.core.applet,
None,