Skip to content

Commit

Permalink
feat(pr: issue-285): add small-talk mobile apps
Browse files Browse the repository at this point in the history
Merge pull request #288 from live-dev999/live-dev999/issue285
  • Loading branch information
live-dev999 committed Apr 4, 2022
2 parents 4342ca2 + 432d238 commit 8b9fd4a
Show file tree
Hide file tree
Showing 27 changed files with 28,288 additions and 4,783 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
Expand Down Expand Up @@ -54,8 +54,8 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<ItemGroup>
<Compile Include="MainActivity.cs" />
Expand Down Expand Up @@ -87,10 +87,10 @@
<Folder Include="Resources\drawable\" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.csproj">
<Project>{67BA1B80-01B3-4983-8722-BA8B62695A17}</Project>
<Name>O2NextGen.SmallTalk</Name>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.Core.csproj">
<Project>{4F14E841-3A6D-4797-BC64-70EF972C3A9D}</Project>
<Name>O2NextGen.SmallTalk.Core</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\Android\Xamarin.Android.CSharp.targets" />
</Project>

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -144,18 +144,18 @@
</Page>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.12"/>
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Microsoft.NETCore.UniversalWindowsPlatform" Version="6.2.13" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.csproj">
<Project>{67BA1B80-01B3-4983-8722-BA8B62695A17}</Project>
<Name>O2NextGen.SmallTalk</Name>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.Core.csproj">
<Project>{4F14E841-3A6D-4797-BC64-70EF972C3A9D}</Project>
<Name>O2NextGen.SmallTalk.Core</Name>
</ProjectReference>
</ItemGroup>
<PropertyGroup Condition=" '$(VisualStudioVersion)' == '' or '$(VisualStudioVersion)' &lt; '14.0' ">
<VisualStudioVersion>14.0</VisualStudioVersion>
</PropertyGroup>
<Import Project="$(MSBuildExtensionsPath)\Microsoft\WindowsXaml\v$(VisualStudioVersion)\Microsoft.Windows.UI.Xaml.CSharp.targets" />
</Project>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -123,14 +123,14 @@
<Reference Include="System.Numerics.Vectors" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2196" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.0" />
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>
<Import Project="$(MSBuildExtensionsPath)\Xamarin\iOS\Xamarin.iOS.CSharp.targets" />
<ItemGroup>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.csproj">
<Project>{67BA1B80-01B3-4983-8722-BA8B62695A17}</Project>
<Name>O2NextGen.SmallTalk</Name>
<ProjectReference Include="..\O2NextGen.SmallTalk\O2NextGen.SmallTalk.Core.csproj">
<Project>{4F14E841-3A6D-4797-BC64-70EF972C3A9D}</Project>
<Name>O2NextGen.SmallTalk.Core</Name>
</ProjectReference>
</ItemGroup>
</Project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
using System;
using O2NextGen.SmallTalk.Core.ViewModels.Base;
using O2NextGen.SmallTalk.Core.Views;
using Xamarin.Forms;
using Xamarin.Forms.Xaml;

namespace O2NextGen.SmallTalk
{
Expand All @@ -9,20 +9,14 @@ public partial class App : Application
public App()
{
InitializeComponent();

MainPage = new MainPage();
}

protected override void OnStart()
{
InitApp();
MainPage = new ChatDetailView();
}

protected override void OnSleep()
{
}

protected override void OnResume()
private void InitApp()
{
//_settingsService = ViewModelLocator.Resolve<ISettingsService>();
//if (!_settingsService.UseMocks)
ViewModelLocator.UpdateDependencies(true);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
using System;
using System.Globalization;
using Xamarin.Forms;

namespace O2NextGen.SmallTalk.Core.Converters
{
public class InversOwnerConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if (value == null)
return false;
var val = int.Parse(value.ToString());
if (val == 1)
{
return true;
}
return false;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using System.Globalization;
using System.Text;
using Xamarin.Forms;

namespace O2NextGen.SmallTalk.Core.Converters
{
public class OwnerConverter : IValueConverter
{
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
{
if(value == null)
return true;
var val = int.Parse(value.ToString());
if (val == 1)
{
return false;
}
return true;
}

public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
{
throw new NotImplementedException();
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
using System.Collections.Generic;

namespace O2NextGen.SmallTalk.Core.Extensions
{
public static class DictionaryExtensions
{
public static (bool ContainsKeyAndValue, bool Value) GetValueAsBool(this IDictionary<string, string> dictionary, string key)
{
return dictionary.ContainsKey(key) && bool.TryParse(dictionary[key], out var parsed) ? (true, parsed) : (false, default);
}

public static (bool ContainsKeyAndValue, int Value) GetValueAsInt(this IDictionary<string, string> dictionary, string key)
{
return dictionary.ContainsKey(key) && int.TryParse(dictionary[key], out var parsed) ? (true, parsed) : (false, default);
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.0</TargetFramework>
<ProduceReferenceAssembly>true</ProduceReferenceAssembly>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|AnyCPU'">
<DebugType>portable</DebugType>
<DebugSymbols>true</DebugSymbols>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2401" />
<PackageReference Include="Xamarin.Essentials" Version="1.7.1" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\..\SDKs\O2NextGen.Sdk.Models\O2NextGen.Sdk.Models.csproj" />
</ItemGroup>

<ItemGroup>
<EmbeddedResource Update="Views\ChatDetailView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
<EmbeddedResource Update="Views\ChatView.xaml">
<Generator>MSBuild:UpdateDesignTimeXaml</Generator>
</EmbeddedResource>
</ItemGroup>
</Project>

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
using O2NextGen.Sdk.NetCore.Models.smalltalk;
using System;
using System.Collections.ObjectModel;
using System.Threading.Tasks;

namespace O2NextGen.SmallTalk.Core.Services.Chat
{
public class ChatService : IChatService
{
public Task AddMessageToSessionAsync(string message)
{
throw new NotImplementedException();
}

public void GetByIdMessage(long sessionId, long id)
{
throw new NotImplementedException();
}

public Task<ObservableCollection<ChatMessage>> GetMessageAsync()
{
throw new NotImplementedException();
}

public void GetMessages(long sessionId)
{
throw new NotImplementedException();
}

public Task<ChatSession> GetSessionAsync()
{
throw new NotImplementedException();
}

public Task<ObservableCollection<ChatSession>> GetSessionsAsync()
{
throw new NotImplementedException();
}

public void Sessions(long sessionId)
{
throw new NotImplementedException();
}
}
}
Loading

0 comments on commit 8b9fd4a

Please sign in to comment.