@@ -107,18 +107,31 @@ along with Foobar. If not, see
107107 }
108108 }
109109
110+ protected override async Task OnInitializedAsync ()
111+ {
112+ await base .OnInitializedAsync ();
113+ applicationOptions = await base .LocalStorageOptionsProvider .GetOptionsAsync <ApplicationOptions >();
114+ base .LocalStorageOptionsProvider .OptionSaved += LocalStorageOptionsProvider_OptionSaved ;
115+ currentRecordingTrack = new ()
116+ {
117+ IsLinkedToPreviousTrack = applicationOptions ! .DefaultIsLinkedToPreviousTrack
118+ };
119+ }
120+
110121 protected override void Dispose (bool disposing )
111122 {
112123 base .Dispose (disposing );
113124 if (Cuesheet != null )
114125 {
115126 Cuesheet .IsRecordingChanged -= Cuesheet_IsRecordingChanged ;
116127 }
128+ base .LocalStorageOptionsProvider .OptionSaved -= LocalStorageOptionsProvider_OptionSaved ;
117129 }
118130
119- Track currentRecordingTrack = new Track ();
131+ Track currentRecordingTrack = new ();
120132 MudAutocomplete <MusicBrainzArtist >? artistInput ;
121133 MudAutocomplete <MusicBrainzTrack >? titleInput ;
134+ ApplicationOptions ? applicationOptions ;
122135
123136 String ? GetValidationErrorMessage (object model , string propertyName )
124137 {
@@ -136,7 +149,10 @@ along with Foobar. If not, see
136149 if (Cuesheet ? .IsRecording == true )
137150 {
138151 Cuesheet ? .AddTrack (currentRecordingTrack );
139- currentRecordingTrack = new ();
152+ currentRecordingTrack = new ()
153+ {
154+ IsLinkedToPreviousTrack = applicationOptions ! .DefaultIsLinkedToPreviousTrack
155+ };
140156 if (artistInput != null )
141157 {
142158 await artistInput .FocusAsync ();
@@ -150,4 +166,13 @@ along with Foobar. If not, see
150166 artistInput ? .ClearAsync ();
151167 titleInput ? .ClearAsync ();
152168 }
169+
170+ void LocalStorageOptionsProvider_OptionSaved (object ? sender , IOptions option )
171+ {
172+ if (option is ApplicationOptions applicationOption )
173+ {
174+ applicationOptions = applicationOption ;
175+ StateHasChanged ();
176+ }
177+ }
153178}
0 commit comments