mirror of
https://github.com/GitJournal/GitJournal.git
synced 2025-07-14 15:33:04 +08:00
Rename NoteBrowsingScreen to JournalBrowsingScreen
I'm add a different interface for viewing Notes, similar to card viewer, and it'll be nice to have a distinction between Journal viewing and Note Viewing. The biggest difference is that when viewing a Journal, there is a timeline and you want to be able to easily move between Journal entries. Whereas with notes, they aren't connected in any obvious way.
This commit is contained in:
@ -4,7 +4,7 @@ import 'package:gitjournal/note.dart';
|
||||
import 'package:gitjournal/utils.dart';
|
||||
import 'package:gitjournal/apis/git.dart';
|
||||
import 'package:gitjournal/screens/note_editor.dart';
|
||||
import 'package:gitjournal/screens/note_viewer.dart';
|
||||
import 'package:gitjournal/screens/journal_browsing.dart';
|
||||
import 'package:gitjournal/state_container.dart';
|
||||
import 'package:gitjournal/widgets/app_drawer.dart';
|
||||
import 'package:gitjournal/widgets/journal_list.dart';
|
||||
@ -28,7 +28,7 @@ class HomeScreen extends StatelessWidget {
|
||||
notes: appState.notes,
|
||||
noteSelectedFunction: (noteIndex) {
|
||||
var route = MaterialPageRoute(
|
||||
builder: (context) => NoteBrowsingScreen(
|
||||
builder: (context) => JournalBrowsingScreen(
|
||||
notes: appState.notes,
|
||||
noteIndex: noteIndex,
|
||||
),
|
||||
@ -148,7 +148,7 @@ class NoteSearch extends SearchDelegate<Note> {
|
||||
notes: filteredNotes,
|
||||
noteSelectedFunction: (noteIndex) {
|
||||
var route = MaterialPageRoute(
|
||||
builder: (context) => NoteBrowsingScreen(
|
||||
builder: (context) => JournalBrowsingScreen(
|
||||
notes: filteredNotes,
|
||||
noteIndex: noteIndex,
|
||||
),
|
||||
|
@ -11,25 +11,25 @@ import 'package:share/share.dart';
|
||||
|
||||
import 'note_editor.dart';
|
||||
|
||||
class NoteBrowsingScreen extends StatefulWidget {
|
||||
class JournalBrowsingScreen extends StatefulWidget {
|
||||
final List<Note> notes;
|
||||
final int noteIndex;
|
||||
|
||||
const NoteBrowsingScreen({
|
||||
const JournalBrowsingScreen({
|
||||
@required this.notes,
|
||||
@required this.noteIndex,
|
||||
});
|
||||
|
||||
@override
|
||||
NoteBrowsingScreenState createState() {
|
||||
return NoteBrowsingScreenState(noteIndex: noteIndex);
|
||||
JournalBrowsingScreenState createState() {
|
||||
return JournalBrowsingScreenState(noteIndex: noteIndex);
|
||||
}
|
||||
}
|
||||
|
||||
class NoteBrowsingScreenState extends State<NoteBrowsingScreen> {
|
||||
class JournalBrowsingScreenState extends State<JournalBrowsingScreen> {
|
||||
PageController pageController;
|
||||
|
||||
NoteBrowsingScreenState({@required int noteIndex}) {
|
||||
JournalBrowsingScreenState({@required int noteIndex}) {
|
||||
pageController = PageController(initialPage: noteIndex);
|
||||
}
|
||||
|
Reference in New Issue
Block a user