attempt to resolve chatter problems
This commit is contained in:
@@ -39,10 +39,12 @@ public class MainWindow : Adw.ApplicationWindow
|
|||||||
if (conversation_guid == null) {
|
if (conversation_guid == null) {
|
||||||
transcript_view.message_list.model = null;
|
transcript_view.message_list.model = null;
|
||||||
} else {
|
} 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);
|
transcript_view.message_list.model = new MessageListModel (conversation_guid);
|
||||||
Repository.get_instance().sync_conversation(conversation_guid);
|
Repository.get_instance().sync_conversation(conversation_guid);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private void on_transcript_send(string message) {
|
private void on_transcript_send(string message) {
|
||||||
if (transcript_view.message_list.model == null) {
|
if (transcript_view.message_list.model == null) {
|
||||||
|
|||||||
@@ -131,8 +131,6 @@ private class MessageLayout : Object
|
|||||||
|
|
||||||
private void draw_background(Snapshot snapshot)
|
private void draw_background(Snapshot snapshot)
|
||||||
{
|
{
|
||||||
snapshot.save();
|
|
||||||
|
|
||||||
var width = get_width();
|
var width = get_width();
|
||||||
var height = get_height();
|
var height = get_height();
|
||||||
var color = background_color;
|
var color = background_color;
|
||||||
@@ -152,17 +150,20 @@ private class MessageLayout : Object
|
|||||||
};
|
};
|
||||||
|
|
||||||
snapshot.append_linear_gradient(bounds, start_point, end_point, stops);
|
snapshot.append_linear_gradient(bounds, start_point, end_point, stops);
|
||||||
|
|
||||||
snapshot.restore();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void with_bubble_clip(Snapshot snapshot, Func<Snapshot> func) {
|
private void with_bubble_clip(Snapshot snapshot, Func<Snapshot> func) {
|
||||||
var width = get_width();
|
var width = get_width();
|
||||||
var height = get_height();
|
var height = get_height();
|
||||||
|
|
||||||
|
if (width > 10 && height > 10) {
|
||||||
var path = create_bubble_path(width, height, from_me);
|
var path = create_bubble_path(width, height, from_me);
|
||||||
snapshot.push_fill(path, Gsk.FillRule.WINDING);
|
snapshot.push_fill(path, Gsk.FillRule.WINDING);
|
||||||
func(snapshot);
|
func(snapshot);
|
||||||
snapshot.pop();
|
snapshot.pop();
|
||||||
|
} else {
|
||||||
|
func(snapshot);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private Gsk.Path create_bubble_path(float width, float height, bool tail_on_right = false)
|
private Gsk.Path create_bubble_path(float width, float height, bool tail_on_right = false)
|
||||||
|
|||||||
Reference in New Issue
Block a user