Added OnIncomingMessages (for loading messages from json array)
This commit is contained in:
committed by
Felix Hartmann (PEA3-Fe-FI)
parent
55bd72b467
commit
92bc795aff
@@ -80,8 +80,7 @@ namespace PolyChat
|
||||
Debug.WriteLine("--- Controller.OnMessage ---");
|
||||
if (data != null && data.Length > 0 && data[0] != null)
|
||||
{
|
||||
Debug.WriteLine("Message: " + data[0]);
|
||||
Debug.WriteLine($"RAW: {data[0].ToString()}");
|
||||
Debug.WriteLine("RAW: " + data[0]);
|
||||
UIController.OnIncomingMessage(ip, data[0].ToString());
|
||||
}
|
||||
else Debug.WriteLine("Undefined: " + data);
|
||||
@@ -92,8 +91,8 @@ namespace PolyChat
|
||||
Connections[IP].Close();
|
||||
Connections.Remove(IP);
|
||||
UIController.OnChatPartnerDeleted(IP);
|
||||
if(!wasConnected)
|
||||
UIController.ShowConnectionError("Connection close", IP, $"Connection to {IP} failed...");
|
||||
string heading = wasConnected ? "Connection Closed" : "Connection Failed";
|
||||
UIController.ShowConnectionError(IP, heading, $"Connecting to {IP} failed...");
|
||||
}
|
||||
|
||||
public string getIP()
|
||||
|
||||
Reference in New Issue
Block a user