Skip to content

Commit e3ccabb

Browse files
authored
Fixed OnPropertyChanged override on ContentPage not passing in CallerMemberName (#890)
1 parent 4b210fa commit e3ccabb

9 files changed

Lines changed: 21 additions & 8 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
## [60.2.9]
2+
- Fixed issue where CallerMemberName was not passed on OnPropertyChanged override. Affects ContentPage, Button, Chip, ContextMenuItem, ContextMenuSeparatorItem, ImageButton, ActivityIndicator and SingleLineInputField.
3+
14
## [60.2.8]
25
- [SystemMessage][iOS] Fixed system messages not being removed when displayed inside a modal.
36

src/library/DIPS.Mobile.UI/Components/Buttons/Button.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Runtime.CompilerServices;
12
using DIPS.Mobile.UI.Resources.Styles.Button;
23

34
namespace DIPS.Mobile.UI.Components.Buttons
@@ -38,7 +39,7 @@ protected override void OnSizeAllocated(double width, double height)
3839
}
3940
}
4041

41-
protected override void OnPropertyChanged(string propertyName = null)
42+
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
4243
{
4344
base.OnPropertyChanged(propertyName);
4445

src/library/DIPS.Mobile.UI/Components/Chips/iOS/Chip.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Runtime.CompilerServices;
12
using DIPS.Mobile.UI.API.Accessibility;
23
using DIPS.Mobile.UI.Effects.Touch;
34
using DIPS.Mobile.UI.Resources.LocalizedStrings.LocalizedStrings;
@@ -193,7 +194,7 @@ private void OnTappedButtonChip(bool didTouchCloseButton)
193194
}
194195
}
195196

196-
protected override void OnPropertyChanged(string propertyName = null)
197+
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
197198
{
198199
base.OnPropertyChanged(propertyName);
199200

src/library/DIPS.Mobile.UI/Components/ContextMenus/ContextMenuItem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Runtime.CompilerServices;
2+
13
namespace DIPS.Mobile.UI.Components.ContextMenus;
24

35
/// <summary>
@@ -27,7 +29,7 @@ internal void SendClicked(ContextMenu contextMenu)
2729
}
2830

2931
#if __IOS__
30-
protected override void OnPropertyChanged(string propertyName = null)
32+
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
3133
{
3234
base.OnPropertyChanged(propertyName);
3335

src/library/DIPS.Mobile.UI/Components/ContextMenus/ContextMenuSeparatorItem.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
using System.Runtime.CompilerServices;
2+
13
namespace DIPS.Mobile.UI.Components.ContextMenus;
24

35
public class ContextMenuSeparatorItem : Element, IContextMenuItem
@@ -20,7 +22,7 @@ public bool IsVisible
2022
public ContextMenu? ContextMenu { get; set; }
2123

2224
#if __IOS__
23-
protected override void OnPropertyChanged(string propertyName = null)
25+
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
2426
{
2527
base.OnPropertyChanged(propertyName);
2628

src/library/DIPS.Mobile.UI/Components/Images/ImageButton/ImageButton.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11

2+
using System.Runtime.CompilerServices;
23
using Microsoft.Maui.Platform;
34
namespace DIPS.Mobile.UI.Components.Images.ImageButton;
45

56
public partial class ImageButton : Microsoft.Maui.Controls.ImageButton
67
{
78
//TODO: Fix when MAUI fixes: https://github.com/dotnet/maui/issues/18001
89
#if __ANDROID__
9-
protected override void OnPropertyChanged(string propertyName = null)
10+
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
1011
{
1112
base.OnPropertyChanged(propertyName);
1213
if (propertyName.Equals(IsVisibleProperty.PropertyName))

src/library/DIPS.Mobile.UI/Components/Loading/Android/ActivityIndicator.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Runtime.CompilerServices;
12
using DIPS.Mobile.UI.Components.Loading.Android;
23
using DIPS.Mobile.UI.Extensions.Android;
34
using Google.Android.Material.ProgressIndicator;
@@ -6,7 +7,7 @@ namespace DIPS.Mobile.UI.Components.Loading;
67

78
public partial class ActivityIndicator
89
{
9-
protected override void OnPropertyChanged(string? propertyName = null)
10+
protected override void OnPropertyChanged([CallerMemberName] string? propertyName = null)
1011
{
1112
base.OnPropertyChanged(propertyName);
1213

src/library/DIPS.Mobile.UI/Components/Pages/ContentPage.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System.Diagnostics;
2+
using System.Runtime.CompilerServices;
23
using DIPS.Mobile.UI.API.Diagnostics;
34
using DIPS.Mobile.UI.API.Library;
45

@@ -65,7 +66,7 @@ private void OnLoaded(object? sender, EventArgs e)
6566
}
6667
}
6768

68-
protected override void OnPropertyChanged(string? propertyName = null)
69+
protected override void OnPropertyChanged([CallerMemberName] string? propertyName = null)
6970
{
7071
base.OnPropertyChanged(propertyName);
7172

src/library/DIPS.Mobile.UI/Components/TextFields/InputFields/SingleLineInputField.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
using System.Runtime.CompilerServices;
12
using DIPS.Mobile.UI.API.Accessibility;
23
using DIPS.Mobile.UI.Effects.Touch;
34
using DIPS.Mobile.UI.Formatters;
@@ -136,7 +137,7 @@ private void SetupInputView()
136137
InnerGrid.Add(InputView, 0, 1);
137138
}
138139

139-
protected override void OnPropertyChanged(string? propertyName = null)
140+
protected override void OnPropertyChanged([CallerMemberName] string? propertyName = null)
140141
{
141142
base.OnPropertyChanged(propertyName);
142143

0 commit comments

Comments
 (0)