Skip to content

Commit

Permalink
Fixed logic behind hidden todos
Browse files Browse the repository at this point in the history
  • Loading branch information
ransome1 committed Sep 23, 2023
1 parent ec37b1b commit 530afa5
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/main/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const defaultConfigData = {
files: [],
appendCreationDate: false,
showCompleted: true,
showHidden: true,
showHidden: false,
windowMaximized: false,
fileSorting: false,
convertRelativeToAbsoluteDates: true,
Expand Down
6 changes: 3 additions & 3 deletions src/main/modules/ProcessDataRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,7 @@ async function processDataRequest(searchString: string): Promise<RequestedData[]
const fileContent = await fs.promises.readFile(path.join(file.path, '', file.todoFile), 'utf8');
let todoObjects: TodoObject[];

todoObjects = await createTodoObjects(fileContent);

if(!showHidden) todoObjects = handleHiddenTodoObjects(todoObjects);
todoObjects = await createTodoObjects(fileContent);

if(!thresholdDateInTheFuture || !dueDateInTheFuture) todoObjects = handleTodoObjectsDates(todoObjects, dueDateInTheFuture, thresholdDateInTheFuture);

Expand All @@ -44,6 +42,8 @@ async function processDataRequest(searchString: string): Promise<RequestedData[]

updateAttributes(todoObjects, sorting, true);

if(!showHidden) todoObjects = handleHiddenTodoObjects(todoObjects);

if (filters) todoObjects = applyFilters(todoObjects, filters);

if (searchString) todoObjects = applySearchString(searchString, todoObjects);
Expand Down
2 changes: 1 addition & 1 deletion src/renderer/SplashScreen.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const SplashScreen = ({ screen, setSearchString, setDialogOpen }) => {
{screen === 'noTodosVisible' && (
<>
<FontAwesomeIcon icon={faHippo} />
<p>No results found for either your search input nor your selected filters</p>
<p>No results found. Check your selected filters, filter settings or search input.</p>
<Box className="buttons">
<Button variant='contained' onClick={handleReset}>
Reset filters and search
Expand Down

0 comments on commit 530afa5

Please sign in to comment.