Skip to content

Commit

Permalink
F-解决话题中订阅者列表为空的问题;完善base64图片头部问题
Browse files Browse the repository at this point in the history
  • Loading branch information
leaf1170124460 committed Jun 2, 2020
1 parent 9c57da7 commit 08da1c7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion CodeChatSDK/Client/Client.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1105,8 +1105,8 @@ private void OnGetFindMeta(ServerMeta meta)
subscriber.Username = publicObject["fn"].ToString();
if (publicObject.ContainsKey("photo"))
{
subscriber.PhotoData = publicObject["photo"]["data"].ToString();
subscriber.PhotoType = publicObject["photo"]["type"].ToString();
subscriber.PhotoData = $"data:image/{subscriber.PhotoType};base64,{ publicObject["photo"]["data"]}";
}
}

Expand Down
2 changes: 2 additions & 0 deletions CodeChatSDK/Controllers/TopicController.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,9 @@ public async Task SetTopic(Topic topic)
{
instance = topic;
MessageController messageController = new MessageController(db.Messages);
SubscriberController subscriberController = new SubscriberController(db.Subscribers);
instance.MessageList = await messageController.GetMessages(instance,instance.Limit);
instance.SubsriberList = await subscriberController.GetSubscribers(instance);
}

/// <summary>
Expand Down
1 change: 0 additions & 1 deletion CodeChatSDK/Repository/Sqlite/SqliteTopicRepository.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,6 @@ public IEnumerable<Topic> GetSync(string condition, int pageIndex, int pageSize,
OrderByDescending(t => t.LastUsed);

pageCount = query.Count() % pageSize == 0 ? (query.Count() / pageSize) : (query.Count() / pageSize) + 1;
;
return query.Skip(pageIndex-1).Take(pageSize).ToList();

}
Expand Down

0 comments on commit 08da1c7

Please sign in to comment.