mirror of
https://github.com/bitwarden/mobile
synced 2026-01-03 00:53:27 +00:00
attach and detach event handlers onappearing and ondisappearing to free up views for GC
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
using System;
|
||||
using Bit.App.Resources;
|
||||
using Xamarin.Forms;
|
||||
|
||||
namespace Bit.App.Controls
|
||||
@@ -42,8 +41,6 @@ namespace Bit.App.Controls
|
||||
Picker.AdjustMarginsForDevice();
|
||||
stackLayout.AdjustPaddingForDevice();
|
||||
|
||||
Tapped += FormPickerCell_Tapped;
|
||||
|
||||
View = stackLayout;
|
||||
}
|
||||
|
||||
@@ -54,5 +51,15 @@ namespace Bit.App.Controls
|
||||
{
|
||||
Picker.Focus();
|
||||
}
|
||||
|
||||
public void InitEvents()
|
||||
{
|
||||
Tapped += FormPickerCell_Tapped;
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Tapped -= FormPickerCell_Tapped;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user