Skip to content

Commit

Permalink
Merge pull request #3 from WamWooWam/patch/dms
Browse files Browse the repository at this point in the history
patch: fix crashes when token has no DMs access
  • Loading branch information
Gargaj authored Dec 27, 2024
2 parents 5034524 + d8db47b commit a6e9c72
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion BlueWP/Inlays/ConvoListInlay.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public async Task Refresh()
var response = await _mainPage.Get<ATProto.Lexicons.Chat.BSky.Convo.ListConvos.Response>(new ATProto.Lexicons.Chat.BSky.Convo.ListConvos()
{
});
if (response != null)
if (response != null && response.convos != null)
{
Convos = response.convos.Select(s => new Convo() {
ConvoView = s,
Expand Down
2 changes: 1 addition & 1 deletion BlueWP/Pages/MainPage.xaml.cs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public async Task RefreshNotificationCounters()
var convoUnreadCountResponse = await Get<ATProto.Lexicons.Chat.BSky.Convo.ListConvos.Response>(new ATProto.Lexicons.Chat.BSky.Convo.ListConvos() {
limit = 1
});
if (convoUnreadCountResponse != null)
if (convoUnreadCountResponse != null && convoUnreadCountResponse.convos != null)
{
UnreadConvoNotificationCount = convoUnreadCountResponse.convos.Sum(s => s.unreadCount);
}
Expand Down

0 comments on commit a6e9c72

Please sign in to comment.