File tree Expand file tree Collapse file tree 3 files changed +13
-0
lines changed
Expand file tree Collapse file tree 3 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -631,6 +631,16 @@ class HomeController extends GetxController {
631631 _refreshTasks ();
632632 }
633633
634+ void changeInDirectory () {
635+ print ("directory change to ${splashController .baseDirectory .value .path }" );
636+ storage = Storage (
637+ Directory (
638+ '${splashController .baseDirectory .value .path }/profiles/${splashController .currentProfile .value }' ,
639+ ),
640+ );
641+ _refreshTasks ();
642+ }
643+
634644 RxBool useDelayTask = false .obs;
635645
636646 Future <void > loadDelayTask () async {
Original file line number Diff line number Diff line change @@ -59,6 +59,7 @@ class SplashController extends GetxController {
5959 void setBaseDirectory (Directory newBaseDirectory) {
6060 baseDirectory.value = newBaseDirectory;
6161 profilesMap.value = _profiles.profilesMap ();
62+ Get .find <HomeController >().changeInDirectory ();
6263 }
6364
6465 void addProfile () {
Original file line number Diff line number Diff line change 33import 'dart:collection' ;
44import 'dart:io' ;
55
6+ import 'package:flutter/widgets.dart' ;
67import 'package:sqflite/sqflite.dart' ;
78import 'package:taskwarrior/app/models/storage.dart' ;
89import 'package:uuid/uuid.dart' ;
@@ -71,6 +72,7 @@ class Profiles {
7172 entity.uri.pathSegments.lastWhere ((segment) => segment.isNotEmpty))
7273 .toList ()
7374 ..sort (comparator);
75+ debugPrint ('Profiles found: $dirs ' );
7476 return dirs;
7577 }
7678
You can’t perform that action at this time.
0 commit comments