diff --git a/src/PostIt/PostIt/ViewModels/Chat/ChatViewModel.cs b/src/PostIt/PostIt/ViewModels/Chat/ChatViewModel.cs index c9ee665d4..68a9fd7cc 100644 --- a/src/PostIt/PostIt/ViewModels/Chat/ChatViewModel.cs +++ b/src/PostIt/PostIt/ViewModels/Chat/ChatViewModel.cs @@ -76,8 +76,11 @@ namespace PostIt.ViewModels.Chat public partial string? SelectedUser { get; set; } [ObservableProperty] + [NotifyPropertyChangedFor(nameof(IsConnectedAndInARoom))] public partial string CurrentRoom { get; set; } = "General"; + public bool IsConnectedAndInARoom => IsConnected && !string.IsNullOrEmpty(CurrentRoom); + [ObservableProperty] public partial string NickName { get; set; } = ""; @@ -87,6 +90,7 @@ namespace PostIt.ViewModels.Chat [ObservableProperty] [NotifyCanExecuteChangedFor(nameof(SendMessageCommand))] [NotifyCanExecuteChangedFor(nameof(OpenCallCommand), nameof(ShowCallCommand))] + [NotifyPropertyChangedFor(nameof(IsConnectedAndInARoom))] public partial bool IsConnected { get; set; } = false; [ObservableProperty] diff --git a/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml b/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml index f0eba8ca2..bca8f1f72 100644 --- a/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml +++ b/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml @@ -2,20 +2,15 @@ x:Class="PostIt.Views.Blogs.BlogsPage" xmlns="https://github.com/avaloniaui" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" - xmlns:d="http://schemas.microsoft.com/expression/blend/2008" - xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns:models="using:Yavsc.Blogspot" xmlns:postitControls="using:PostIt.Controls" xmlns:reader="clr-namespace:Markdown.Avalonia;assembly=Markdown.Avalonia" xmlns:services="using:PostIt.Services" xmlns:vm="using:PostIt.ViewModels" x:Name="BlogsPageRoot" - HorizontalAlignment="Stretch" - VerticalAlignment="Stretch" x:DataType="vm:BlogsViewModel" AutomaticallyApplySafeAreaPadding="True" - Header="Billets de blog" - mc:Ignorable="d"> + Header="Billets de blog"> diff --git a/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml.cs b/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml.cs index 26eb7177c..ea220d1b1 100644 --- a/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml.cs +++ b/src/PostIt/PostIt/Views/Blogs/BlogsPage.axaml.cs @@ -88,7 +88,6 @@ public partial class BlogsPage : ContentPage PostsSplitter.HorizontalAlignment = isWide ? HorizontalAlignment.Center : HorizontalAlignment.Stretch; PostsSplitter.VerticalAlignment = isWide ? VerticalAlignment.Stretch : VerticalAlignment.Center; PostsSplitter.Margin = isWide ? new Thickness(0, 12) : new Thickness(12, 0); - NavigationPage.SetBarHeightOverride(this, isWide ? 36 : null); } private static void SetArea(Control control, int row, int column, int rowSpan = 1, int columnSpan = 1) diff --git a/src/PostIt/PostIt/Views/Chat/ChatPage.axaml b/src/PostIt/PostIt/Views/Chat/ChatPage.axaml index b4a08028c..678b54852 100644 --- a/src/PostIt/PostIt/Views/Chat/ChatPage.axaml +++ b/src/PostIt/PostIt/Views/Chat/ChatPage.axaml @@ -30,7 +30,7 @@ Text="{Binding CurrentRoom}" PlaceholderText="Nom du salon" />