Private
Public Access
1
0

attempt to resolve chatter problems

This commit is contained in:
2025-05-03 21:45:17 -07:00
parent e44120712f
commit 518608a04e
2 changed files with 13 additions and 10 deletions

View File

@@ -39,10 +39,12 @@ public class MainWindow : Adw.ApplicationWindow
if (conversation_guid == null) {
transcript_view.message_list.model = null;
} else {
if (transcript_view.message_list.model == null || transcript_view.message_list.model.conversation_guid != conversation_guid) {
transcript_view.message_list.model = new MessageListModel (conversation_guid);
Repository.get_instance().sync_conversation(conversation_guid);
}
}
}
private void on_transcript_send(string message) {
if (transcript_view.message_list.model == null) {

View File

@@ -131,8 +131,6 @@ private class MessageLayout : Object
private void draw_background(Snapshot snapshot)
{
snapshot.save();
var width = get_width();
var height = get_height();
var color = background_color;
@@ -152,17 +150,20 @@ private class MessageLayout : Object
};
snapshot.append_linear_gradient(bounds, start_point, end_point, stops);
snapshot.restore();
}
private void with_bubble_clip(Snapshot snapshot, Func<Snapshot> func) {
var width = get_width();
var height = get_height();
if (width > 10 && height > 10) {
var path = create_bubble_path(width, height, from_me);
snapshot.push_fill(path, Gsk.FillRule.WINDING);
func(snapshot);
snapshot.pop();
} else {
func(snapshot);
}
}
private Gsk.Path create_bubble_path(float width, float height, bool tail_on_right = false)