add comments, format, lint fix

This commit is contained in:
Samuel Newman
2026-04-20 12:35:41 +03:00
parent aac48ff3d5
commit 59a01c599b
4 changed files with 12 additions and 5 deletions
@@ -22,6 +22,10 @@ class ExpoBlueskyContextMenuView: ExpoView, UIContextMenuInteractionDelegate {
self.addInteraction(interaction)
}
// RN layout can leave bounds at fractional-pixel values. The targeted preview
// snapshots this view's bounds for its return animation, and subpixel mismatches
// cause a visible glitch when the preview shrinks back into the thumbnail.
// Snapping to whole-pixel values prevents that.
override var bounds: CGRect {
get {
let b = super.bounds
@@ -67,4 +67,3 @@ enum IconRenderer {
return CGRect(x: parts[0], y: parts[1], width: parts[2], height: parts[3])
}
}
@@ -2,14 +2,15 @@ import UIKit
/// Minimal SVG path `d` parser. Handles the subset used by Bluesky's icon set:
/// M m L l H h V v C c S s Q q T t A a Z z.
/// Assumes well-formed input from the app's own compiled-in icon paths.
enum SVGPathParser {
static func parse(_ d: String) -> UIBezierPath {
let path = UIBezierPath()
var tokens = Tokenizer(d)
var currentPoint = CGPoint.zero
var subpathStart = CGPoint.zero
var lastControl: CGPoint? = nil
var lastQuadControl: CGPoint? = nil
var lastControl: CGPoint?
var lastQuadControl: CGPoint?
var command: Character = "M"
while let next = tokens.peek() {
+5 -2
View File
@@ -1,4 +1,8 @@
import {forwardRef, type ForwardRefExoticComponent, type RefAttributes} from 'react'
import {
forwardRef,
type ForwardRefExoticComponent,
type RefAttributes,
} from 'react'
import Svg, {Path} from 'react-native-svg'
import {type Props, useCommonSVGProps} from '#/components/icons/common'
@@ -120,4 +124,3 @@ export function createMultiPathSVG({
Icon.svgStrokeWidth = 0
return Icon
}