From 97ad1e2912faaeef6670ea968ec8cf09f80d6864 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Mon, 11 Jul 2022 18:02:15 -0500 Subject: [PATCH] Used platformView property for disconnect (#8662) * Used platformView property for disconnect * - fix entry handler as well --- src/Core/src/Handlers/Editor/EditorHandler.Android.cs | 2 +- src/Core/src/Handlers/Entry/EntryHandler.Android.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Core/src/Handlers/Editor/EditorHandler.Android.cs b/src/Core/src/Handlers/Editor/EditorHandler.Android.cs index 3b2e3da3ce8f..f5deb5cc94a4 100644 --- a/src/Core/src/Handlers/Editor/EditorHandler.Android.cs +++ b/src/Core/src/Handlers/Editor/EditorHandler.Android.cs @@ -54,7 +54,7 @@ protected override void DisconnectHandler(AppCompatEditText platformView) platformView.TextChanged -= OnTextChanged; // TODO: NET7 issoto - Remove the casting once we can set the TPlatformView generic type as MauiAppCompatEditText - if (_set && PlatformView is MauiAppCompatEditText editText) + if (_set && platformView is MauiAppCompatEditText editText) editText.SelectionChanged -= OnSelectionChanged; _set = false; diff --git a/src/Core/src/Handlers/Entry/EntryHandler.Android.cs b/src/Core/src/Handlers/Entry/EntryHandler.Android.cs index 9a235cfdbbfc..f23264f40275 100644 --- a/src/Core/src/Handlers/Entry/EntryHandler.Android.cs +++ b/src/Core/src/Handlers/Entry/EntryHandler.Android.cs @@ -61,7 +61,7 @@ protected override void DisconnectHandler(AppCompatEditText platformView) platformView.EditorAction -= OnEditorAction; // TODO: NET7 issoto - Remove the casting once we can set the TPlatformView generic type as MauiAppCompatEditText - if (_set && PlatformView is MauiAppCompatEditText editText) + if (_set && platformView is MauiAppCompatEditText editText) editText.SelectionChanged -= OnSelectionChanged; _set = false;