// Executed every second public override void updateScreen() { Logging.info("Updating chat"); Utils.sendUiCommand(webView, "setNickname", friend.nickname); if (friend.online) { Utils.sendUiCommand(webView, "showIndicator", "true"); } else { Utils.sendUiCommand(webView, "showIndicator", "false"); } // Show connectivity warning bar if (StreamClientManager.isConnectedTo(node_ip) == null) { if (connectedToNode == true) { connectedToNode = false; Utils.sendUiCommand(webView, "showWarning", "Not connected to S2 node"); } } else { if (connectedToNode == false) { connectedToNode = true; Utils.sendUiCommand(webView, "showWarning", ""); } } // Show the messages indicator int msgCount = FriendList.getUnreadMessageCount(); if (msgCount != lastMessageCount) { lastMessageCount = msgCount; //webView.Eval(string.Format("showUnread({0})", lastMessageCount)); } }
// Executed every second public override void updateScreen() { base.updateScreen(); Utils.sendUiCommand(webView, "setNickname", friend.nickname); if (friend.online) { Utils.sendUiCommand(webView, "showIndicator", "true"); } else { Utils.sendUiCommand(webView, "showIndicator", "false"); } // Show connectivity warning bar if (NetworkClientManager.getConnectedClients(true).Count() > 0) { if (!Config.enablePushNotifications && StreamClientManager.isConnectedTo(friend.searchForRelay()) == null) { Utils.sendUiCommand(webView, "showWarning", "Connecting to Ixian S2..."); } else { Utils.sendUiCommand(webView, "showWarning", ""); } } else { Utils.sendUiCommand(webView, "showWarning", "Connecting to Ixian DLT..."); } // Show the messages indicator int msgCount = FriendList.getUnreadMessageCount(); if (msgCount != lastMessageCount) { lastMessageCount = msgCount; //webView.Eval(string.Format("showUnread({0})", lastMessageCount)); } }
// Executed every second private void onTimer() { if (friend.online) { webView.Eval("showIndicator(true)"); } else { webView.Eval("showIndicator(false)"); } // Show connectivity warning bar if (StreamClientManager.isConnectedTo(node_ip) == null) { if (connectedToNode == true) { connectedToNode = false; webView.Eval("showWarning('Not connected to S2 node')"); } } else { if (connectedToNode == false) { connectedToNode = true; webView.Eval("showWarning('')"); } } // Show the messages indicator int msgCount = FriendList.getUnreadMessageCount(); if (msgCount != lastMessageCount) { lastMessageCount = msgCount; webView.Eval(string.Format("showUnread({0})", lastMessageCount)); } }