aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/conversation_summary/conversation_view.vala
diff options
context:
space:
mode:
authorfiaxh <git@mx.ax.lt>2018-04-24 14:59:28 +0200
committerfiaxh <git@mx.ax.lt>2018-04-30 11:03:59 +0200
commitc1533f25775d3d9db5395107d6f3fd695b041926 (patch)
tree340a3da2c48cb9809a00b734c35c8172e9b89b6c /main/src/ui/conversation_summary/conversation_view.vala
parentf0dd0e0c3af10f2772efd94aadbded38f3c155bb (diff)
downloaddino-c1533f25775d3d9db5395107d6f3fd695b041926.tar.gz
dino-c1533f25775d3d9db5395107d6f3fd695b041926.zip
Redesign chat input + move file upload there
Diffstat (limited to 'main/src/ui/conversation_summary/conversation_view.vala')
-rw-r--r--main/src/ui/conversation_summary/conversation_view.vala16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/src/ui/conversation_summary/conversation_view.vala b/main/src/ui/conversation_summary/conversation_view.vala
index 03dbe554..fac53b7d 100644
--- a/main/src/ui/conversation_summary/conversation_view.vala
+++ b/main/src/ui/conversation_summary/conversation_view.vala
@@ -32,6 +32,7 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
private Mutex reloading_mutex = Mutex();
private bool animate = false;
+ private bool firstLoad = true;
public ConversationView(StreamInteractor stream_interactor) {
this.stream_interactor = stream_interactor;
@@ -59,7 +60,22 @@ public class ConversationView : Box, Plugins.ConversationItemCollection {
Util.force_base_background(this);
}
+ // Workaround GTK TextView issues: Delay first load of contents
public void initialize_for_conversation(Conversation? conversation) {
+ if (firstLoad) {
+ int timeout = firstLoad ? 1000 : 0;
+ Timeout.add(timeout, () => {
+ initialize_for_conversation_(conversation);
+ return false;
+ });
+ firstLoad = false;
+ } else {
+ initialize_for_conversation_(conversation);
+ }
+
+ }
+
+ private void initialize_for_conversation_(Conversation? conversation) {
Dino.Application app = Dino.Application.get_default();
if (this.conversation != null) {
foreach (Plugins.ConversationItemPopulator populator in app.plugin_registry.conversation_item_populators) {