List cleanup on remove (#1069)

* 💄 Hide Add to List option on own profile

*  Remove Lists tab when last list is removed

*  Add listener to list delete on profile screen

*  Only show save changes in list modal when changes are made
This commit is contained in:
Foysal Ahamed
2023-07-28 18:04:27 +02:00
committed by GitHub
parent 38d78e16bf
commit eec300d772
6 changed files with 60 additions and 12 deletions
+4 -1
View File
@@ -87,7 +87,10 @@ export class ProfileUiModel {
}
get selectedView() {
return this.selectorItems[this.selectedViewIndex]
// If, for whatever reason, the selected view index is not available, default back to posts
// This can happen when the user was focused on a view but performed an action that caused
// the view to disappear (e.g. deleting the last list in their list of lists https://imgflip.com/i/7txu1y)
return this.selectorItems[this.selectedViewIndex] || Sections.Posts
}
get uiItems() {