Skip to content

Commit

Permalink
notes: Fuck fuck fuck fuck
Browse files Browse the repository at this point in the history
  • Loading branch information
HrX03 committed Mar 9, 2020
1 parent a93f9d7 commit fb06417
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 24 deletions.
4 changes: 2 additions & 2 deletions android/local.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sdk.dir=/home/hrx/Android/Sdk
flutter.sdk=/home/hrx/flutter
flutter.buildMode=debug
flutter.versionName=1.5.1
flutter.versionCode=13
flutter.versionName=1.5.2
flutter.versionCode=14
1 change: 0 additions & 1 deletion lib/internal/note_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ import 'dart:convert';

import 'package:http/http.dart';
import 'package:potato_notes/main.dart';
import 'package:potato_notes/ui/note_color_selector.dart';
import 'package:sqflite/sqflite.dart';

class NoteHelper {
Expand Down
37 changes: 17 additions & 20 deletions lib/routes/modify_notes_route.dart
Original file line number Diff line number Diff line change
Expand Up @@ -286,9 +286,6 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
decoration: InputDecoration(
hintText: locales.modifyNotesRoute_title,
border: InputBorder.none),
onChanged: (text) {
noteTitle = text;
},
textCapitalization: TextCapitalization.sentences,
style: TextStyle(
fontSize: 18.0,
Expand Down Expand Up @@ -441,9 +438,9 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
onTap: () {
Navigator.pop(context);
String shareText = "";
if (noteTitle != "")
shareText += noteTitle + "\n\n";
shareText += noteContent;
if (titleController.text != "")
shareText += titleController.text + "\n\n";
shareText += contentController.text;
Share.share(shareText);
},
),
Expand Down Expand Up @@ -477,11 +474,11 @@ class _ModifyNotesState extends State<ModifyNotesRoute>

String noteContents = "";

if (noteTitle != "")
if (titleController.text != "")
noteContents +=
"# " + noteTitle + "\n\n";
"# " + titleController.text + "\n\n";

noteContents += noteContent;
noteContents += contentController.text;

File(noteExportPath)
.writeAsString(noteContents)
Expand Down Expand Up @@ -524,11 +521,11 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
int.parse(appInfo
.notificationsIdList
.last),
noteTitle != ""
? noteTitle
titleController.text != ""
? titleController.text
: locales
.notesMainPageRoute_pinnedNote,
noteContent,
contentController.text,
NotificationDetails(
AndroidNotificationDetails(
'0',
Expand Down Expand Up @@ -791,7 +788,7 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
}

bool saveAndPop(bool stopDefaultButtonEvent) {
if (((noteContent != "" || noteTitle != "") && noteIsList == 0) ||
if (((contentController.text != "" || titleController.text != "") && noteIsList == 0) ||
(noteIsList == 1 && noteListParseString != null)) {
asyncExecutor();
} else {
Expand Down Expand Up @@ -829,8 +826,8 @@ class _ModifyNotesState extends State<ModifyNotesRoute>

Note note = Note(
id: noteId,
title: noteTitle,
content: noteContent,
title: titleController.text,
content: contentController.text,
isStarred: noteIsStarred,
date: noteDate,
color: noteColor,
Expand Down Expand Up @@ -1033,10 +1030,10 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
appInfo.remindersNotifIdList.add(notifId);
await FlutterLocalNotificationsPlugin().schedule(
int.parse(appInfo.remindersNotifIdList.last),
noteTitle != ""
? noteTitle
titleController.text != ""
? titleController.text
: locales.modifyNotesRoute_reminder,
noteContent,
contentController.text,
completeReminder,
NotificationDetails(
AndroidNotificationDetails(
Expand Down Expand Up @@ -1112,7 +1109,7 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
if (noteIsList == 0) {
noteIsList = 1;
checkList.clear();
List<String> initialList = noteContent.split("\n");
List<String> initialList = contentController.text.split("\n");
initialList.forEach((item) {
checkList
.add(ListPair(checkValue: 0, title: item));
Expand All @@ -1124,7 +1121,7 @@ class _ModifyNotesState extends State<ModifyNotesRoute>
for (int i = 0; i < checkList.length; i++) {
titleList.add(checkList[i].title);
}
noteContent = titleList.join("\n");
contentController.text = titleList.join("\n");
checkList.clear();
}
});
Expand Down
2 changes: 1 addition & 1 deletion pubspec.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: potato_notes
description: Official POSP note app
version: 1.5.2+14
version: 1.5.2+15

environment:
sdk: '>=2.0.0 <3.0.0'
Expand Down

0 comments on commit fb06417

Please sign in to comment.