Fix issue with translations and maximum statuses on lists

This commit is contained in:
Marcin Czachurski 2023-11-13 13:48:37 +01:00
parent 2b88870995
commit 2a44115bd8
6 changed files with 324 additions and 12 deletions

View File

@ -50,7 +50,7 @@ class ViewedStatusHandler {
fetchDescriptor.fetchLimit = 1
fetchDescriptor.includePendingChanges = true
guard let first = try modelContext.fetch(fetchDescriptor).first else {
guard try modelContext.fetch(fetchDescriptor).first != nil else {
return false
}

View File

@ -322,6 +322,18 @@
"value" : "Potenciadores desactivados"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Desgaitutako bultzadak"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Boosters désactivés"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1250,7 +1262,7 @@
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"state" : "needs_review",
"value" : "Le jeton d'accès n'est pas trouvé."
}
},
@ -1276,6 +1288,18 @@
"value" : "Avatar no se ha descargado."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Avatarra ez da deskargatu."
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "L'avatar n'a pas été téléchargé."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1333,6 +1357,18 @@
"value" : "No se puede configurar el receptor de transacciones."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Ezin da transakzio-entzulea konfiguratu."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Impossible de configurer l'auditeur de transactions."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1355,6 +1391,18 @@
"value" : "No se pueden descargar productos in-app."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Ezin dira deskargatu aplikazioko produktuak."
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Impossible de télécharger des produits in-app."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1445,6 +1493,18 @@
"value" : "Error durante la descarga de metadatos."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Errore bat gertatu da metadatuak deskargatzean."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Erreur lors du téléchargement des métadonnées."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1467,6 +1527,18 @@
"value" : "Error durante la descarga de nuevos estados para la cantidad de nuevos estados."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Errore bat gertatu da egoera berriak deskargatzean egoera berrien kopuruagatik."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Erreur lors du téléchargement des nouveaux statuts pour le nombre de nouveaux statuts."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1697,6 +1769,18 @@
"value" : "Compra fallida."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Erosketak huts egin du."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "L'achat a échoué."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1787,6 +1871,18 @@
"value" : "Error en la recarga."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Ezin izan da freskatu tokena."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Le jeton de rafraîchissement a échoué."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1845,6 +1941,18 @@
"value" : "más..."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "gehiago..."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "plus..."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -1867,6 +1975,18 @@
"value" : "Se han recuperado nuevos tokens de acceso."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Sarbide-token berriak berreskuratu dira."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "De nouveaux jetons d'accès ont été récupérés."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -4391,6 +4511,24 @@
"value" : "Error during enabling notifications."
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Error al activar las notificaciones."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Errore bat gertatu da jakinarazpenak gaitzean."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Erreur lors de l'activation des notifications."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -5478,6 +5616,24 @@
"value" : "Notifications"
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Notificaciones"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Jakinarazpenak"
}
},
"fr" : {
"stringUnit" : {
"state" : "translated",
"value" : "Notifications"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -5495,6 +5651,24 @@
"value" : "The application badge with the number of new notifications will be visible near the application icon."
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "La insignia de la aplicación con el número de nuevas notificaciones será visible cerca del icono de la aplicación."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Jakinarazpen berrien kopurua duen aplikazioaren bereizgarria aplikazioaren ikonoaren ondoan egongo da ikusgai."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Le badge de l'application indiquant le nombre de nouvelles notifications sera visible près de l'icône de l'application."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -5512,6 +5686,24 @@
"value" : "Show application badge"
}
},
"es" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Mostrar distintivo de solicitud"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Erakutsi aplikazioaren bereizgarria"
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Afficher le badge d'application"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8463,6 +8655,18 @@
"value" : "Renderiza Emoji personalizados en texto. Soporta emojis locales y remotos. Los emojis remotos se cargan y almacenan en caché con Nuke."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Errendatu Emoji pertsonalizatua testuan. Tokiko eta urruneko emojiak onartzen ditu. Urruneko emojiak kargatu eta cachean gordetzen dira Nuke erabiliz."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Rendu des Emoji personnalisés dans le texte. Supporte les emojis locaux et distants. Les emojis distants sont chargés et mis en cache à l'aide de Nuke."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8555,6 +8759,18 @@
"value" : "Fuente utilizada en la aplicación en los iconos y en la pantalla de inicio."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Aplikazioan erabiltzen den letra-tipoa ikonoetan eta harrera-pantailan."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Police utilisée dans l'application dans les icônes et dans l'écran d'accueil."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8647,6 +8863,18 @@
"value" : "Es un paquete Swift que intenta convertir HTML en Markdown."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "HTML Markdown bihurtzen saiatzen den Swift pakete bat da."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Il s'agit d'un paquet Swift qui tente de convertir HTML en Markdown."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8739,6 +8967,18 @@
"value" : "HTMLString es una librería escrita en Swift que permite a tu programa añadir y eliminar entidades HTML en Strings."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "HTMLString Swift-en idatzitako liburutegi bat da, zure programari Strings-en HTML entitateak gehitzeko eta kentzeko aukera ematen diona."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "HTMLString est une bibliothèque écrite en Swift qui permet à votre programme d'ajouter et de supprimer des entités HTML dans des chaînes de caractères."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8831,6 +9071,18 @@
"value" : "Nuke proporciona una forma eficaz de descargar y mostrar imágenes en tu aplicación. Es fácil de aprender y utilizar. Su arquitectura permite muchas características de gran alcance al tiempo que ofrece posibilidades prácticamente ilimitadas para la personalización."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Nuke-k zure aplikazioan irudiak deskargatzeko eta bistaratzeko modu eraginkorra eskaintzen du. Ikasteko eta erabiltzeko erraza da. Bere arkitekturak ezaugarri indartsu asko ahalbidetzen ditu pertsonalizatzeko aukera ia mugagabeak eskaintzen dituen bitartean."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Nuke offre un moyen efficace de télécharger et d'afficher des images dans votre application. Il est facile à apprendre et à utiliser. Son architecture permet de nombreuses fonctionnalités puissantes tout en offrant des possibilités de personnalisation pratiquement illimitées."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -8958,6 +9210,18 @@
"value" : "Un µFramework para mostrar alertas como la que se utiliza al copiar desde la mesa de trabajo o al conectar el lápiz de Apple."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Pasteboardetik kopiatzerakoan edo Apple pencil konektatzean erabiltzen den bezalako alertak erakusteko µFramework."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Un µFramework pour afficher des alertes comme celles utilisées lors de la copie à partir d'un tableau ou de la connexion d'un crayon Apple."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -9050,6 +9314,18 @@
"value" : "Librería OAuth basada en Swift para iOS y macOS."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Swift-en oinarritutako OAuth liburutegia iOS eta macOSentzat."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Bibliothèque OAuth basée sur Swift pour iOS et macOS."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -9142,6 +9418,18 @@
"value" : "Un sencillo generador de imágenes de código QR para usar en tus aplicaciones, escrito en Swift 5."
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Zure aplikazioetan erabiltzeko QR kode irudi-sorgailu soil bat, Swift 5-en idatzia."
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Un simple générateur d'image de code QR à utiliser dans vos applications, écrit en Swift 5."
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -9923,6 +10211,18 @@
"value" : "Potenciadores desactivados"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Desgaitutako bultzadak"
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Boosters désactivés"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",
@ -10877,6 +11177,18 @@
"value" : "No se admite"
}
},
"eu" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Ez da onartzen"
}
},
"fr" : {
"stringUnit" : {
"state" : "needs_review",
"value" : "Non pris en charge"
}
},
"pl" : {
"stringUnit" : {
"state" : "translated",

View File

@ -1209,7 +1209,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage.widget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -1243,7 +1243,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage.widget;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -1276,7 +1276,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage.share;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -1308,7 +1308,7 @@
"@executable_path/Frameworks",
"@executable_path/../../Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage.share;
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
@ -1474,7 +1474,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage;
PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = "";
@ -1517,7 +1517,7 @@
"$(inherited)",
"@executable_path/Frameworks",
);
MARKETING_VERSION = 2.0.0;
MARKETING_VERSION = 2.0.1;
PRODUCT_BUNDLE_IDENTIFIER = dev.mczachurski.vernissage;
PRODUCT_NAME = "$(TARGET_NAME)";
SUPPORTED_PLATFORMS = "iphoneos iphonesimulator";

View File

@ -20,7 +20,7 @@ public class HomeTimelineService {
public static let shared = HomeTimelineService()
private init() { }
private let maximumAmountOfDownloadedStatuses = 80
private let maximumAmountOfDownloadedStatuses = 40
private let imagePrefetcher = ImagePrefetcher(destination: .diskCache)
private let semaphore = AsyncSemaphore(value: 1)
@ -45,7 +45,7 @@ public class HomeTimelineService {
var statuses: [Status] = []
var newestStatusId = lastSeenStatusId
// There can be more then 80 newest statuses, that's why we have to sometimes send more then one request.
// There can be more then 40 newest statuses, that's why we have to sometimes send more then one request.
while true {
do {
let downloadedStatuses = try await client.getHomeTimeline(minId: newestStatusId,

View File

@ -27,7 +27,7 @@ struct HomeTimelineView: View {
@State private var opacity = 0.0
@State private var offset = -50.0
private let defaultLimit = 80
private let defaultLimit = 40
private let imagePrefetcher = ImagePrefetcher(destination: .diskCache)
private let timelineDoubleTapTip = TimelineDoubleTapTip()

View File

@ -61,7 +61,7 @@ struct StatusesView: View {
@State private var containerWidth: Double = UIDevice.isIPad ? UIScreen.main.bounds.width / 3 : UIScreen.main.bounds.width
@State private var containerHeight: Double = UIDevice.isIPad ? UIScreen.main.bounds.height / 3 : UIScreen.main.bounds.height
private let defaultLimit = 80
private let defaultLimit = 40
private let imagePrefetcher = ImagePrefetcher(destination: .diskCache)
var body: some View {