Skip to content

Commit

Permalink
fix: do not get ipv6
Browse files Browse the repository at this point in the history
feat: add counter to downloaded apps
  • Loading branch information
khcrysalis committed Oct 27, 2024
1 parent 763afc9 commit 266ffe9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Shared/Server/Server+TLS.swift
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ func getLocalIPAddress() -> String? {
let interface = ptr!.pointee
let addrFamily = interface.ifa_addr.pointee.sa_family

if addrFamily == UInt8(AF_INET) || addrFamily == UInt8(AF_INET6) {
if addrFamily == UInt8(AF_INET) {

let name = String(cString: interface.ifa_name)
if name == "en0" || name == "pdp_ip0" {
Expand Down
10 changes: 8 additions & 2 deletions iOS/Views/Apps/LibraryViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -75,14 +75,20 @@ extension LibraryViewController {
case 0:
let headerWithButton = GroupedSectionHeader(
title: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_TITLE_SIGNED_APPS"),
subtitle: String.localized(signedApps?.count ?? 0 > 1 ? "LIBRARY_VIEW_CONTROLLER_SECTION_TITLE_SIGNED_APPS_TOTAL_PLURAL" : "LIBRARY_VIEW_CONTROLLER_SECTION_TITLE_SIGNED_APPS_TOTAL", arguments: String(signedApps?.count ?? 0)),
subtitle: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_TITLE_SIGNED_APPS_TOTAL", arguments: String(signedApps?.count ?? 0)),
buttonTitle: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_BUTTON_IMPORT"),
buttonAction: {
self.startImporting()
})
return headerWithButton
case 1:
let headerWithButton = GroupedSectionHeader(title: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_DOWNLOADED_APPS"))

let headerWithButton = GroupedSectionHeader(
title: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_DOWNLOADED_APPS"),
subtitle: String.localized("%@ Downloaded", arguments: String(downloadedApps?.count ?? 0)),
buttonTitle: String.localized("LIBRARY_VIEW_CONTROLLER_SECTION_BUTTON_IMPORT")
)

return headerWithButton
default:
return nil
Expand Down

0 comments on commit 266ffe9

Please sign in to comment.