Index: src/Views/LearningUnitListItem.xaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Views/LearningUnitListItem.xaml b/src/Views/LearningUnitListItem.xaml
--- a/src/Views/LearningUnitListItem.xaml (revision 0861b95f06aae43a83852872dacba2ed5f743d08)
+++ b/src/Views/LearningUnitListItem.xaml (revision f1714ff74973c30896da5c74b3e51f685591ae00)
@@ -48,27 +48,30 @@
-
+
-
+
-
UTF-8
===================================================================
diff --git a/src/Services/MockDataService.cs b/src/Services/MockDataService.cs
--- a/src/Services/MockDataService.cs (revision 0861b95f06aae43a83852872dacba2ed5f743d08)
+++ b/src/Services/MockDataService.cs (revision f1714ff74973c30896da5c74b3e51f685591ae00)
@@ -169,9 +169,9 @@
"Greeting for the First Time",
"Starting an Introduction",
"Talking about the Weather",
- "Talking about the Your Nationality",
- "Talking about Your Age",
- "Test"
+ // "Talking about the Your Nationality",
+ // "Talking about Your Age",
+ // "Test"
};
public static string[] lessonTitles = new string[]{
@@ -180,10 +180,10 @@
"Where are you from?",
"How old are you?",
"What do you do?",
- "What is your phone number?",
- "What is your email address?",
- "What is your address?",
- "What are you doing?"
+ // "What is your phone number?",
+ // "What is your email address?",
+ // "What is your address?",
+ // "What are you doing?"
};
public static string[] icons = new string[]{
@@ -203,17 +203,18 @@
if (_units != null)
return _units;
- int count = 4;
+ int count = 50;
_units = new List();
for (int i = 0; i < count; i++)
{
_units.Add(new Unit
{
UnitNumber = i,
- Title = unitTitles[i],
+ Title = unitTitles[i % unitTitles.Length],
SubTitle = $"Sub Title {i}",
+ IsShowingLessons = i % 2 == 0,
Icon = $"{icons[Random.Shared.Next(0, icons.Length - 1)]}",
- Chapters = GenerateChapters(Random.Shared.Next(1, chapterTitles.Length))
+ Chapters = GenerateChapters(chapterTitles.Length)
});
}
return _units;
@@ -227,7 +228,7 @@
chapters.Add(new Chapter
{
Title = chapterTitles[i],
- Lessons = GenerateLessons(Random.Shared.Next(1, lessonTitles.Length))
+ Lessons = GenerateLessons(lessonTitles.Length)
});
}
return chapters;
Index: src/Pages/LearningPage.xaml
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Pages/LearningPage.xaml b/src/Pages/LearningPage.xaml
--- a/src/Pages/LearningPage.xaml (revision 0861b95f06aae43a83852872dacba2ed5f743d08)
+++ b/src/Pages/LearningPage.xaml (revision f1714ff74973c30896da5c74b3e51f685591ae00)
@@ -3,6 +3,7 @@
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
xmlns:vm="clr-namespace:AllTheLists.ViewModels"
xmlns:v="clr-namespace:AllTheLists.Views"
+ xmlns:learning="clr-namespace:AllTheLists.Models.Learning"
x:DataType="vm:LearningUnitsViewModel"
x:Class="AllTheLists.Pages.LearningPage"
Title="LearningPage">
@@ -26,7 +27,7 @@
ItemSpacing="10" />
-
+
Index: src/Models/Learning/Unit.cs
IDEA additional info:
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
<+>UTF-8
===================================================================
diff --git a/src/Models/Learning/Unit.cs b/src/Models/Learning/Unit.cs
--- a/src/Models/Learning/Unit.cs (revision 0861b95f06aae43a83852872dacba2ed5f743d08)
+++ b/src/Models/Learning/Unit.cs (revision f1714ff74973c30896da5c74b3e51f685591ae00)
@@ -1,4 +1,5 @@
using CommunityToolkit.Mvvm.ComponentModel;
+using CommunityToolkit.Mvvm.Input;
namespace AllTheLists.Models.Learning;
@@ -21,5 +22,10 @@
[ObservableProperty]
private bool _isShowingLessons;
-
+
+ [RelayCommand]
+ public void ToggleLessons()
+ {
+ IsShowingLessons = !IsShowingLessons;
+ }
}