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