add close button

This commit is contained in:
Vova
2024-05-05 16:19:58 +03:00
parent 3dfeea71f0
commit 12289c52f8
20 changed files with 327 additions and 191 deletions
+4 -1
View File
@@ -4,6 +4,7 @@ namespace TV_Player.MAUI
{
public class MainViewModel : ObservableViewModelBase
{
private IDisposable _groupsSubscriber;
private List<GroupInfo> _programs;
public List<GroupInfo> Programs
{
@@ -17,7 +18,7 @@ namespace TV_Player.MAUI
public MainViewModel()
{
ItemSelectedCommand = new Command(OnItemSelected);
ProgramsData.Instance.GroupsInformation.Subscribe(x=>Programs = x);
_groupsSubscriber = TVPlayerViewModel.Instance.PlaylistData.GroupsInformation.Subscribe(x => Programs = x);
}
private void OnItemSelected()
@@ -33,6 +34,8 @@ namespace TV_Player.MAUI
};
// Navigate to the OtherPage
navigation.PushAsync(programPage);
_groupsSubscriber.Dispose();
}
}
}