@@ -35,7 +35,7 @@ public function getAll(string $userId, bool $autoCreateNotesFolder = false, ?boo
3535 try {
3636 $ notesFolder = $ this ->getNotesFolder ($ userId , $ autoCreateNotesFolder );
3737 if ($ showHidden === null ) {
38- $ showHidden = $ this ->settings ->get ($ userId , 'showHidden ' );
38+ $ showHidden = $ this ->settings ->getValueBool ($ userId , 'showHidden ' );
3939 }
4040 $ data = self ::gatherNoteFiles ($ customExtension , $ notesFolder , $ showHidden );
4141 $ fileIds = array_keys ($ data ['files ' ]);
@@ -69,7 +69,7 @@ public function countNotes(string $userId) : int {
6969 $ customExtension = $ this ->getCustomExtension ($ userId );
7070 try {
7171 $ notesFolder = $ this ->getNotesFolder ($ userId , false );
72- $ showHidden = $ this ->settings ->get ($ userId , 'showHidden ' );
72+ $ showHidden = $ this ->settings ->getValueBool ($ userId , 'showHidden ' );
7373 $ data = self ::gatherNoteFiles ($ customExtension , $ notesFolder , $ showHidden );
7474 return count ($ data ['files ' ]);
7575 } catch (NotesFolderException $ e ) {
@@ -132,9 +132,9 @@ public function create(string $userId, string $title, string $category) : Note {
132132 $ this ->noteUtil ->ensureSufficientStorage ($ folder , 1 );
133133
134134 // get file name
135- $ fileSuffix = $ this ->settings ->get ($ userId , 'fileSuffix ' );
135+ $ fileSuffix = $ this ->settings ->getValueString ($ userId , 'fileSuffix ' );
136136 if ($ fileSuffix === 'custom ' ) {
137- $ fileSuffix = $ this ->settings ->get ($ userId , 'customSuffix ' );
137+ $ fileSuffix = $ this ->settings ->getValueString ($ userId , 'customSuffix ' );
138138 }
139139 $ filename = $ this ->noteUtil ->generateFileName ($ folder , $ title , $ fileSuffix , -1 );
140140 // create file
@@ -211,7 +211,7 @@ private static function isNote(FileInfo $file, string $customExtension) : bool {
211211 * Retrieve the value of user defined files extension
212212 */
213213 private function getCustomExtension (string $ userId ) {
214- $ suffix = $ this ->settings ->get ($ userId , 'customSuffix ' );
214+ $ suffix = $ this ->settings ->getValueString ($ userId , 'customSuffix ' );
215215 return ltrim ($ suffix , '. ' );
216216 }
217217
0 commit comments