shows the results of the filtering but going up or down a zoom is disabled, temporarily
This commit is contained in:
parent
add5192b3c
commit
072f8274c0
@ -229,6 +229,7 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
if (!_isLoaded) {
|
||||
return const Center(child: CircularProgressIndicator()); // loading screen
|
||||
}
|
||||
// final List<AugmentTree> nodesToDisplay;
|
||||
|
||||
final AugmentTree
|
||||
currentZoomNodeForThisEmail = //each index is an email in the thread
|
||||
@ -237,18 +238,20 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
print(currentZoomNodeForThisEmail.children);
|
||||
print(currentZoomNodeForThisEmail.parent);
|
||||
|
||||
|
||||
// if (_isFilteringActive) {
|
||||
// nodesToDisplay = queryResults;
|
||||
// } else {
|
||||
// nodesToDisplay = currentZoomNodeForThisEmail.children;
|
||||
// }
|
||||
final canZoomOut = currentZoomNodeForThisEmail.parent != null;
|
||||
if (currentZoomNodeForThisEmail.children.isEmpty) {
|
||||
|
||||
if (_isFilteringActive) {
|
||||
return ListView.builder(
|
||||
itemCount: 1,
|
||||
itemCount: queryResults.length,
|
||||
itemBuilder: (context, index) {
|
||||
final childNode = currentZoomNodeForThisEmail;
|
||||
// final childNode = currentZoomNodeForThisEmail.children[index];
|
||||
final canZoomIn = childNode.children.isNotEmpty;
|
||||
// currentZoomNodeForThisEmail.addNumbering();
|
||||
AugmentTree childNode = queryResults[index];
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6.0),
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12, vertical: 6),
|
||||
child: Material(
|
||||
elevation: 1,
|
||||
borderRadius: BorderRadius.circular(12),
|
||||
@ -263,14 +266,11 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
spacing: 4.0,
|
||||
children: [
|
||||
OutlinedButton(
|
||||
onPressed:
|
||||
canZoomOut ? () => _goToParent(indexThread) : null,
|
||||
onPressed: null,
|
||||
child: Icon(Icons.north_west_sharp),
|
||||
),
|
||||
OutlinedButton(
|
||||
onPressed: canZoomIn
|
||||
? () => _goToChildren(indexThread, index)
|
||||
: null,
|
||||
onPressed: null,
|
||||
child: Icon(Icons.south_east_sharp),
|
||||
),
|
||||
],
|
||||
@ -306,8 +306,7 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
),
|
||||
),
|
||||
);
|
||||
},
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
return ListView.builder(
|
||||
@ -315,7 +314,6 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
itemBuilder: (context, index) {
|
||||
final childNode = currentZoomNodeForThisEmail.children[index];
|
||||
final canZoomIn = childNode.children.isNotEmpty;
|
||||
// currentZoomNodeForThisEmail.addNumbering();
|
||||
return Padding(
|
||||
padding: const EdgeInsets.symmetric(horizontal: 12.0, vertical: 6.0),
|
||||
child: Material(
|
||||
@ -479,8 +477,10 @@ class _CollapsableEmailsState extends State<CollapsableEmails> {
|
||||
}
|
||||
if (results.isNotEmpty) {
|
||||
setState(() {
|
||||
currentZoomTree[targetEmailIndex] = results.first; // Update the state
|
||||
queryResults = results;
|
||||
// currentZoomTree[targetEmailIndex] = results.first; // Update the state
|
||||
_isFilteringActive = true;
|
||||
currentZoomTree[targetEmailIndex] = root;
|
||||
});
|
||||
print(currentZoomTree);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user