Merge branch 'vnext' of github.com:pazof/yavsc into vnext
This commit is contained in:
commit
108cbbc5b4
5 changed files with 1 additions and 47 deletions
|
|
@ -65,9 +65,6 @@
|
||||||
<Compile Include="ViewModels\Messaging\ChatUserCollection.cs" />
|
<Compile Include="ViewModels\Messaging\ChatUserCollection.cs" />
|
||||||
<Compile Include="ViewModels\Messaging\ChatUserInfo.cs" />
|
<Compile Include="ViewModels\Messaging\ChatUserInfo.cs" />
|
||||||
<Compile Include="Model\Social\Chat\Connection.cs" />
|
<Compile Include="Model\Social\Chat\Connection.cs" />
|
||||||
<Compile Include="Pages\Chat\PrivateChatPage.xaml.cs">
|
|
||||||
<DependentUpon>PrivateChatPage.xaml</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="ViewModels\Validation\Error.cs" />
|
<Compile Include="ViewModels\Validation\Error.cs" />
|
||||||
<Compile Include="ViewModels\Validation\ModelState.cs" />
|
<Compile Include="ViewModels\Validation\ModelState.cs" />
|
||||||
<Compile Include="ViewModels\PageState.cs" />
|
<Compile Include="ViewModels\PageState.cs" />
|
||||||
|
|
@ -507,12 +504,6 @@
|
||||||
<Name>YavscLib</Name>
|
<Name>YavscLib</Name>
|
||||||
</ProjectReference>
|
</ProjectReference>
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
|
||||||
<EmbeddedResource Include="Pages\Chat\PrivateChatPage.xaml">
|
|
||||||
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
|
|
||||||
<SubType>Designer</SubType>
|
|
||||||
</EmbeddedResource>
|
|
||||||
</ItemGroup>
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="Images\Chat\talk.png" />
|
<EmbeddedResource Include="Images\Chat\talk.png" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
|
||||||
|
|
@ -11,10 +11,5 @@ namespace BookAStar.Model.Social.Messaging
|
||||||
public string SenderId { get; set; }
|
public string SenderId { get; set; }
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
public bool Read { get; set; }
|
public bool Read { get; set; }
|
||||||
[JsonIgnore]
|
|
||||||
public bool FromMe { get
|
|
||||||
{
|
|
||||||
return App.ChatHubConnection?.ConnectionId == SenderId;
|
|
||||||
} }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
|
||||||
<ContentPage xmlns="http://xamarin.com/schemas/2014/forms"
|
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
|
|
||||||
x:Class="BookAStar.Pages.Chat.PrivateChatPage"
|
|
||||||
Style="{StaticResource PageStyle}">
|
|
||||||
<Label Text="{Binding MainText}" VerticalOptions="Center" HorizontalOptions="Center" />
|
|
||||||
</ContentPage>
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
|
||||||
using System.Linq;
|
|
||||||
using System.Text;
|
|
||||||
using System.Threading.Tasks;
|
|
||||||
|
|
||||||
using Xamarin.Forms;
|
|
||||||
|
|
||||||
namespace BookAStar.Pages.Chat
|
|
||||||
{
|
|
||||||
public partial class PrivateChatPage : ContentPage
|
|
||||||
{
|
|
||||||
public PrivateChatPage()
|
|
||||||
{
|
|
||||||
InitializeComponent();
|
|
||||||
/*
|
|
||||||
ToolbarItems.Add(new ToolbarItem(
|
|
||||||
name: "...",
|
|
||||||
icon: null,
|
|
||||||
activated: () => { }));*/
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -19,9 +19,7 @@ namespace BookAStar.ViewModels.Messaging
|
||||||
}
|
}
|
||||||
public void OnPrivateMessage(ChatMessage msg)
|
public void OnPrivateMessage(ChatMessage msg)
|
||||||
{
|
{
|
||||||
var sender = this.FirstOrDefault(user => user.Connections.Any(
|
var sender = this.FirstOrDefault(user => user.UserName == msg.SenderId);
|
||||||
cx => cx.ConnectionId == msg.SenderId
|
|
||||||
));
|
|
||||||
if (sender != null)
|
if (sender != null)
|
||||||
{
|
{
|
||||||
sender.PrivateMessages.Add(msg);
|
sender.PrivateMessages.Add(msg);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue