renomage ...
This commit is contained in:
@ -275,7 +275,7 @@ namespace BookAStar
|
||||
chatHubProxy = chatHubConnection.CreateHubProxy("ChatHub");
|
||||
chatHubProxy.On<string, string>("PV", (n, m) => {
|
||||
DataManager.Current.PrivateMessages.Add(
|
||||
new UserMessage
|
||||
new ChatMessage
|
||||
{
|
||||
Message = m,
|
||||
SenderId = n,
|
||||
|
@ -20,7 +20,7 @@
|
||||
/// </summary>
|
||||
internal LocalEntity<EditEstimateViewModel, long> EstimationCache { get; set; }
|
||||
internal LocalEntity<BillingLine, string> EstimateLinesTemplates { get; set; }
|
||||
internal LocalEntity<UserMessage, int> PrivateMessages { get; set; }
|
||||
internal LocalEntity<ChatMessage, int> PrivateMessages { get; set; }
|
||||
protected static DataManager current ;
|
||||
|
||||
public static DataManager Current
|
||||
@ -42,7 +42,7 @@
|
||||
AppState = new LocalEntity<PageState, int>(s => s.Position);
|
||||
EstimationCache = new LocalEntity<EditEstimateViewModel, long>(e => e.Query.Id);
|
||||
EstimateLinesTemplates = new LocalEntity<BillingLine, string>(l => l.Description);
|
||||
PrivateMessages = new LocalEntity<UserMessage, int>(m=> m.GetHashCode());
|
||||
PrivateMessages = new LocalEntity<ChatMessage, int>(m=> m.GetHashCode());
|
||||
|
||||
PrivateMessages.Load();
|
||||
BookQueries.Load();
|
||||
|
@ -6,7 +6,7 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace BookAStar.Model.Social.Messaging
|
||||
{
|
||||
public class UserMessage
|
||||
public class ChatMessage
|
||||
{
|
||||
public DateTime Date { get; set; }
|
||||
public string SenderId { get; set; }
|
||||
|
@ -13,7 +13,8 @@ namespace BookAStar.Pages
|
||||
{
|
||||
public partial class ChatPage : TabbedPage
|
||||
{
|
||||
public ObservableCollection<UserMessage> Messages { get; set; }
|
||||
public ObservableCollection<ChatMessage> Messages { get; set; }
|
||||
public ObservableCollection<ChatMessage> Notifs { get; set; }
|
||||
public string ChatUser { get; set; }
|
||||
|
||||
public ChatPage()
|
||||
@ -40,7 +41,7 @@ namespace BookAStar.Pages
|
||||
};
|
||||
// contactPicker.DisplayProperty = "UserName";
|
||||
|
||||
messageList.ItemsSource = Messages = new ObservableCollection<UserMessage>();
|
||||
messageList.ItemsSource = Messages = new ObservableCollection<ChatMessage>();
|
||||
PVList.ItemsSource = DataManager.Current.PrivateMessages;
|
||||
App.CurrentApp.ChatHubConnection.StateChanged += ChatHubConnection_StateChanged;
|
||||
// DataManager.Current.Contacts
|
||||
@ -50,7 +51,7 @@ namespace BookAStar.Pages
|
||||
|
||||
App.CurrentApp.ChatHubProxy.On<string, string>("addMessage", (n, m) =>
|
||||
{
|
||||
Messages.Add(new UserMessage
|
||||
Messages.Add(new ChatMessage
|
||||
{
|
||||
Message = m,
|
||||
SenderId = n,
|
||||
@ -58,9 +59,9 @@ namespace BookAStar.Pages
|
||||
});
|
||||
});
|
||||
|
||||
App.CurrentApp.ChatHubProxy.On<string, string>("addMessage", (n, m) =>
|
||||
App.CurrentApp.ChatHubProxy.On<string, string>("notify", (n, m) =>
|
||||
{
|
||||
Messages.Add(new UserMessage
|
||||
Notifs.Add(new ChatMessage
|
||||
{
|
||||
Message = m,
|
||||
SenderId = n,
|
||||
|
Reference in New Issue
Block a user