-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8dbbd22
commit 549ff9c
Showing
13 changed files
with
287 additions
and
150 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file modified
BIN
+11.4 KB
(120%)
.../project.xcworkspace/xcuserdata/aayushpokharel.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
21 changes: 21 additions & 0 deletions
21
NativeTwitch/Assets.xcassets/streamer-image-placeholder.imageset/Contents.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
{ | ||
"images" : [ | ||
{ | ||
"filename" : "blank-profile-picture-973460_960_720.png", | ||
"idiom" : "universal", | ||
"scale" : "1x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "2x" | ||
}, | ||
{ | ||
"idiom" : "universal", | ||
"scale" : "3x" | ||
} | ||
], | ||
"info" : { | ||
"author" : "xcode", | ||
"version" : 1 | ||
} | ||
} |
Binary file added
BIN
+17.3 KB
...ts/streamer-image-placeholder.imageset/blank-profile-picture-973460_960_720.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Double+Extension.swift | ||
// NativeTwitch | ||
// | ||
// Created by Aayush Pokharel on 2021-10-27. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Double { | ||
var shortStringRepresentation: String { | ||
if self.isNaN { | ||
return "NaN" | ||
} | ||
if self.isInfinite { | ||
return "\(self < 0.0 ? "-" : "+")Infinity" | ||
} | ||
let units = ["", "k", "M"] | ||
var interval = self | ||
var i = 0 | ||
while i < units.count - 1 { | ||
if abs(interval) < 1000.0 { | ||
break | ||
} | ||
i += 1 | ||
interval /= 1000.0 | ||
} | ||
// + 2 to have one digit after the comma, + 1 to not have any. | ||
// Remove the * and the number of digits argument to display all the digits after the comma. | ||
return "\(String(format: "%0.*g", Int(log10(abs(interval))) + 2, interval))\(units[i])" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// | ||
// NSTextField+Extension.swift | ||
// NativeTwitch | ||
// | ||
// Created by Aayush Pokharel on 2021-10-27. | ||
// | ||
|
||
import SwiftUI | ||
|
||
extension NSTextField{ | ||
open override var focusRingType: NSFocusRingType{ | ||
get{.none} | ||
set{} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.