<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>tizen11.0</TargetFramework>
- <AssemblyName>Notifications</AssemblyName>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
ThemeManager.ThemeChanged += OnThemeChanged;
}
+ public void Dispose()
+ {
+ if (notificationsViewModel != null)
+ {
+ notificationsViewModel.NotificationSelected -= OnNotificationSelected;
+ }
+
+ if(notificationsDetailViewModel != null)
+ {
+ notificationsDetailViewModel.DetailContentRemoved -= OnDetailContentRemoved;
+ }
+
+ baseView.BindingContext = null;
+ baseView.BackKeyPressed -= OnBackKeyPressed;
+ baseView.Dispose();
+ }
+
private void OnThemeChanged(object sender, ThemeChangedEventArgs e)
{
if (e.IsPlatformThemeChanged)
get => (bool)GetValue(IsContentAvailableProperty);
set => SetValue(IsContentAvailableProperty, value);
}
+
+ protected override void Dispose(DisposeTypes type)
+ {
+ if (Disposed)
+ {
+ return;
+ }
+
+ if (type == DisposeTypes.Explicit)
+ {
+ RemoveContent();
+
+ detailContentView?.Dispose();
+ detailContentView = null;
+
+ noNotificationsText?.Dispose();
+ noNotificationsText = null;
+
+ notificationsView.SelectedItem = null;
+ notificationsView?.Dispose();
+ notificationsView = null;
+
+ clearAllButton?.Dispose();
+ clearAllButton = null;
+
+ topView?.Remove(backButton);
+ backButton?.Dispose();
+ backButton = null;
+
+ topView?.Remove(titleText);
+ titleText?.Dispose();
+ titleText = null;
+
+ Remove(topView);
+ topView?.Dispose();
+ topView = null;
+ }
+ Tizen.Log.Info(AppConstants.LogTag, "Dispose BaseView");
+ base.Dispose(type);
+ }
}
}