attempt to resolve chatter problems
This commit is contained in:
@@ -39,8 +39,10 @@ public class MainWindow : Adw.ApplicationWindow
|
||||
if (conversation_guid == null) {
|
||||
transcript_view.message_list.model = null;
|
||||
} else {
|
||||
transcript_view.message_list.model = new MessageListModel (conversation_guid);
|
||||
Repository.get_instance().sync_conversation(conversation_guid);
|
||||
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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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();
|
||||
var path = create_bubble_path(width, height, from_me);
|
||||
snapshot.push_fill(path, Gsk.FillRule.WINDING);
|
||||
func(snapshot);
|
||||
snapshot.pop();
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user