Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

fmt

Richie McIlroy3691a86f6d9e
diff --git a/apps/desktop/src/routes/(window-chrome)/settings/feedback.tsx b/apps/desktop/src/routes/(window-chrome)/settings/feedback.tsx
index ae2b62d75..62419fc8a 100644
--- a/apps/desktop/src/routes/(window-chrome)/settings/feedback.tsx
+++ b/apps/desktop/src/routes/(window-chrome)/settings/feedback.tsx
@@ -131,18 +131,18 @@ export default function FeedbackTab() {
}
>
{(diag) => {
- const d = diag();
+ const d = diag() as Record<string, unknown>;
const osVersion =
"macosVersion" in d
- ? d.macosVersion
+ ? (d.macosVersion as { displayName: string } | null)
: "windowsVersion" in d
- ? d.windowsVersion
+ ? (d.windowsVersion as { displayName: string } | null)
: null;
const captureSupported =
"screenCaptureSupported" in d
- ? d.screenCaptureSupported
+ ? (d.screenCaptureSupported as boolean)
: "graphicsCaptureSupported" in d
- ? d.graphicsCaptureSupported
+ ? (d.graphicsCaptureSupported as boolean)
: false;
return (
<div class="space-y-3 text-sm">
@@ -153,7 +153,7 @@ export default function FeedbackTab() {
Operating System
</p>
<p class="text-gray-10 bg-gray-2 px-2 py-1.5 rounded font-mono text-xs">
- {(ver() as { displayName: string }).displayName}
+ {ver().displayName}
</p>
</div>
)}
@@ -175,13 +175,13 @@ export default function FeedbackTab() {
</div>
</div>
- <Show when={d.availableEncoders.length > 0}>
+ <Show when={(d.availableEncoders as string[])?.length > 0}>
<div class="space-y-1">
<p class="text-gray-11 font-medium">
Available Encoders
</p>
<div class="flex gap-1.5 flex-wrap">
- <For each={d.availableEncoders}>
+ <For each={d.availableEncoders as string[]}>
{(encoder) => (
<span class="px-2 py-1 bg-gray-2 rounded text-xs text-gray-10 font-mono">
{encoder}
diff --git a/crates/recording/src/output_pipeline/core.rs b/crates/recording/src/output_pipeline/core.rs
index 6ce7e0815..058db9940 100644
--- a/crates/recording/src/output_pipeline/core.rs
+++ b/crates/recording/src/output_pipeline/core.rs
@@ -72,12 +72,12 @@ impl TimestampAnomalyTracker {
let raw_duration = Duration::from_secs_f64(signed_secs);
let adjusted = raw_duration.saturating_add(self.accumulated_compensation);
- if let Some(last) = self.last_valid_duration {
- if let Some(forward_jump) = adjusted.checked_sub(last) {
- let jump_secs = forward_jump.as_secs_f64();
- if jump_secs > LARGE_FORWARD_JUMP_SECS {
- return self.handle_forward_jump(last, adjusted, jump_secs);
- }
+ if let Some(last) = self.last_valid_duration
+ && let Some(forward_jump) = adjusted.checked_sub(last)
+ {
+ let jump_secs = forward_jump.as_secs_f64();
+ if jump_secs > LARGE_FORWARD_JUMP_SECS {
+ return self.handle_forward_jump(last, adjusted, jump_secs);
}
}