Skip to content

Commit 7400e5e

Browse files
committed
Multi-line comments
1 parent ad8d8ce commit 7400e5e

File tree

6 files changed

+21
-13
lines changed

6 files changed

+21
-13
lines changed

src/Bible.Alarm/Common/ViewHelpers/AnimateUtils.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ public static void AnimateTouchFeedback(View view)
2424

2525
// Default to White if BackgroundColor is not set
2626
var originalColor = view.BackgroundColor ?? Colors.White;
27-
var pressedColor = Color.FromArgb("#E0E0E0"); // Light gray for pressed state
27+
// Light gray for pressed state
28+
var pressedColor = Color.FromArgb("#E0E0E0");
2829

2930
// Animate to pressed state
3031
view.Animate("touchPress", new Animation(v =>

src/Bible.Alarm/Platforms/Android/Handlers/SwitchHandler.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,12 @@ private void ApplySwitchStyling(SwitchCompat switchCompat)
2626
var primaryColor = global::Android.Graphics.Color.Argb(255, 72, 61, 139);
2727

2828
// Gray color for knob when off and track
29-
var grayColor = global::Android.Graphics.Color.Argb(255, 158, 158, 158); // Medium gray
29+
// Medium gray
30+
var grayColor = global::Android.Graphics.Color.Argb(255, 158, 158, 158);
3031

3132
// Create a more visible version for the track when on (60% opacity for better visibility)
32-
var trackOnColor = global::Android.Graphics.Color.Argb(153, 72, 61, 139); // Primary color with 60% opacity
33+
// Primary color with 60% opacity
34+
var trackOnColor = global::Android.Graphics.Color.Argb(153, 72, 61, 139);
3335

3436
// Create color state lists for smooth transitions
3537
// StateChecked = 16842914 (from Android.Resource.Attribute.StateChecked)
@@ -68,7 +70,8 @@ private void ApplySwitchStyling(SwitchCompat switchCompat)
6870
// Create a new drawable without stroke/border
6971
var gradientDrawable = new global::Android.Graphics.Drawables.GradientDrawable();
7072
gradientDrawable.SetShape(global::Android.Graphics.Drawables.ShapeType.Rectangle);
71-
gradientDrawable.SetCornerRadius(switchCompat.Context.Resources.DisplayMetrics.Density * 12); // Rounded corners
73+
// Rounded corners
74+
gradientDrawable.SetCornerRadius(switchCompat.Context.Resources.DisplayMetrics.Density * 12);
7275
gradientDrawable.SetColor(global::Android.Graphics.Color.Transparent);
7376
switchCompat.TrackDrawable = gradientDrawable;
7477
}

src/Bible.Alarm/Services/Media/AudioPlayer.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ public partial class AudioPlayer : IAudioPlayer, IRecipient<RecreateMediaElement
3434
private TaskCompletionSource<bool>? _mediaOpenedCompletionSource;
3535
private bool _isResetting = false;
3636
private TimeSpan _lastDuration = TimeSpan.Zero;
37-
private MediaElement? _mediaElement; // MediaElement instance - populated in PrepareAsync
37+
// MediaElement instance - populated in PrepareAsync
38+
private MediaElement? _mediaElement;
3839

3940
public TimeSpan? CurrentPosition => _mediaElement?.Position;
4041
public TimeSpan Duration => _mediaElement?.Duration ?? TimeSpan.Zero;
@@ -442,7 +443,8 @@ public async Task ResetAsync()
442443
// This is the ONLY place where we call ReleaseMediaSession - only on final stop, not during track changes
443444
// Add a small delay to ensure MediaElement has fully stopped before releasing
444445
_logger.Information("Resetting playback - calling ReleaseMediaSession to remove notification");
445-
await Task.Delay(100); // Small delay to let MediaElement finish stopping
446+
// Small delay to let MediaElement finish stopping
447+
await Task.Delay(100);
446448
await MainThread.InvokeOnMainThreadAsync(() =>
447449
{
448450
if (_mediaElement != null)
@@ -531,7 +533,8 @@ public void Receive(RecreateMediaElementMessage message)
531533
{
532534
_logger.Information("Received RecreateMediaElementMessage - unsubscribing from old MediaElement");
533535
UnsubscribeFromMediaElement(_mediaElement);
534-
_mediaElement = null; // Clear reference since MediaElement is being recreated
536+
// Clear reference since MediaElement is being recreated
537+
_mediaElement = null;
535538
}
536539
}
537540

src/Bible.Alarm/Services/Media/MediaElementService.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@ public class MediaElementService : IMediaElementService, IRecipient<RecreateMedi
2121
{
2222
private readonly INavigationService _navigationService;
2323
private readonly ILogger _logger;
24-
private readonly object _lockObject = new object(); // Local lock for this service
24+
// Local lock for this service
25+
private readonly object _lockObject = new object();
2526

2627
public MediaElementService(INavigationService navigationService, ILogger logger)
2728
{

src/Bible.Alarm/Services/Media/PlaybackService.cs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ public void Receive(NextButtonPressedMessage message)
227227
// This prevents IllegalStateException when ExoPlayer is transitioning
228228
Task.Run(async () =>
229229
{
230-
await Task.Delay(150); // Delay to let MediaSession finish
230+
// Delay to let MediaSession finish
231+
await Task.Delay(150);
231232
await MainThread.InvokeOnMainThreadAsync(async () =>
232233
{
233234
await PlayNextAsync();
@@ -246,7 +247,8 @@ public void Receive(PreviousButtonPressedMessage message)
246247
// This prevents IllegalStateException when ExoPlayer is transitioning
247248
Task.Run(async () =>
248249
{
249-
await Task.Delay(150); // Delay to let MediaSession finish
250+
// Delay to let MediaSession finish
251+
await Task.Delay(150);
250252
await MainThread.InvokeOnMainThreadAsync(async () =>
251253
{
252254
await PlayPreviousAsync();

src/Bible.Alarm/Views/General/AlarmModal.xaml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,11 @@
111111
HeightRequest="{OnPlatform Default='45',
112112
WinUI='37'}"
113113
HorizontalOptions="Center"
114-
HorizontalTextAlignment="Center"
115114
IsVisible="{Binding IsBusy, Converter={StaticResource negateBooleanConverter}}"
116115
Padding="40,0"
117116
Text="DISMISS"
118117
TextColor="SlateBlue"
119-
VerticalOptions="Center"
120-
VerticalTextAlignment="Center" />
118+
VerticalOptions="Center" />
121119
<ActivityIndicator
122120
IsRunning="{Binding IsBusy}"
123121
IsVisible="{Binding IsBusy}"

0 commit comments

Comments
 (0)