WT 1.1.14 tutorial positions fix, uxcam settings

This commit is contained in:
bossanyit
2021-05-06 22:44:55 +02:00
parent 3137bc2330
commit cd0687a529
10 changed files with 77 additions and 115 deletions
+1 -16
View File
@@ -12,7 +12,7 @@ part 'tutorial_state.dart';
class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
late String tutorialName;
final double mediaHeightBase = 390;
final double mediaHeightBase = 675;
bool isActive = false;
bool canActivate = false;
@@ -78,8 +78,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
this.showCheckText = action!.showCheckText == true;
this.parent = action!.parent;
}
calculateHeight();
}
}
@@ -110,17 +108,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
return true;
}
void calculateHeight() {
int count = getElementCount('<p>');
count += getElementCount('<br/>');
double lines = (actualText!.length / 32 + count);
if (lines < 5) {
lines = lines + 2;
}
calculatedHeight = lines * 15;
print("Calculated Height: $calculatedHeight length: ${actualText!.length} lines: $lines count: $count");
}
int getElementCount(String elem) {
int pos = 0;
int count = 0;
@@ -180,7 +167,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
print("Step: $step");
setNextStepData(step);
print("Menu rebuild $menuBloc");
if (menuBloc != null) {
menuBloc!.add(MenuCreate());
}
@@ -200,7 +186,6 @@ class TutorialBloc extends Bloc<TutorialEvent, TutorialState> with Logging {
isActive = false;
canActivate = false;
ActivityDone? activityDone = ActivityDone.tutorialBasic.searchByString(tutorialName);
print("activity Finished: $activityDone");
if (activityDone != null) {
await Cache().setActivityDonePrefs(activityDone);
}