mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-10-22 16:17:20 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
61b6e25a91 | ||
|
|
50cff820de | ||
|
|
4e586a28c8 | ||
|
|
0702b4ed57 | ||
|
|
4a2132a682 |
No files matched your search
@@ -61,7 +61,7 @@
|
|||||||
- (void) updateHost:(TemporaryHost *)host {
|
- (void) updateHost:(TemporaryHost *)host {
|
||||||
[_managedObjectContext performBlockAndWait:^{
|
[_managedObjectContext performBlockAndWait:^{
|
||||||
// Add a new persistent managed object if one doesn't exist
|
// Add a new persistent managed object if one doesn't exist
|
||||||
Host* parent = [self getHostForTemporaryHost:host];
|
Host* parent = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
|
||||||
if (parent == nil) {
|
if (parent == nil) {
|
||||||
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Host" inManagedObjectContext:_managedObjectContext];
|
NSEntityDescription* entity = [NSEntityDescription entityForName:@"Host" inManagedObjectContext:_managedObjectContext];
|
||||||
parent = [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:_managedObjectContext];
|
parent = [[Host alloc] initWithEntity:entity insertIntoManagedObjectContext:_managedObjectContext];
|
||||||
@@ -76,16 +76,17 @@
|
|||||||
|
|
||||||
- (void) updateAppsForExistingHost:(TemporaryHost *)host {
|
- (void) updateAppsForExistingHost:(TemporaryHost *)host {
|
||||||
[_managedObjectContext performBlockAndWait:^{
|
[_managedObjectContext performBlockAndWait:^{
|
||||||
Host* parent = [self getHostForTemporaryHost:host];
|
Host* parent = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
|
||||||
if (parent == nil) {
|
if (parent == nil) {
|
||||||
// The host must exist to be updated
|
// The host must exist to be updated
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
NSMutableSet *applist = [[NSMutableSet alloc] init];
|
NSMutableSet *applist = [[NSMutableSet alloc] init];
|
||||||
|
NSArray *appRecords = [self fetchRecords:@"App"];
|
||||||
for (TemporaryApp* app in host.appList) {
|
for (TemporaryApp* app in host.appList) {
|
||||||
// Add a new persistent managed object if one doesn't exist
|
// Add a new persistent managed object if one doesn't exist
|
||||||
App* parentApp = [self getAppForTemporaryApp:app];
|
App* parentApp = [self getAppForTemporaryApp:app withAppRecords:appRecords];
|
||||||
if (parentApp == nil) {
|
if (parentApp == nil) {
|
||||||
NSEntityDescription* entity = [NSEntityDescription entityForName:@"App" inManagedObjectContext:_managedObjectContext];
|
NSEntityDescription* entity = [NSEntityDescription entityForName:@"App" inManagedObjectContext:_managedObjectContext];
|
||||||
parentApp = [[App alloc] initWithEntity:entity insertIntoManagedObjectContext:_managedObjectContext];
|
parentApp = [[App alloc] initWithEntity:entity insertIntoManagedObjectContext:_managedObjectContext];
|
||||||
@@ -104,7 +105,7 @@
|
|||||||
|
|
||||||
- (void) updateIconForExistingApp:(TemporaryApp*)app {
|
- (void) updateIconForExistingApp:(TemporaryApp*)app {
|
||||||
[_managedObjectContext performBlockAndWait:^{
|
[_managedObjectContext performBlockAndWait:^{
|
||||||
App* parentApp = [self getAppForTemporaryApp:app];
|
App* parentApp = [self getAppForTemporaryApp:app withAppRecords:[self fetchRecords:@"App"]];
|
||||||
if (parentApp == nil) {
|
if (parentApp == nil) {
|
||||||
// The app must exist to be updated
|
// The app must exist to be updated
|
||||||
return;
|
return;
|
||||||
@@ -142,7 +143,7 @@
|
|||||||
|
|
||||||
- (void) removeApp:(TemporaryApp*)app {
|
- (void) removeApp:(TemporaryApp*)app {
|
||||||
[_managedObjectContext performBlockAndWait:^{
|
[_managedObjectContext performBlockAndWait:^{
|
||||||
App* managedApp = [self getAppForTemporaryApp:app];
|
App* managedApp = [self getAppForTemporaryApp:app withAppRecords:[self fetchRecords:@"App"]];
|
||||||
if (managedApp != nil) {
|
if (managedApp != nil) {
|
||||||
[_managedObjectContext deleteObject:managedApp];
|
[_managedObjectContext deleteObject:managedApp];
|
||||||
[self saveData];
|
[self saveData];
|
||||||
@@ -152,7 +153,7 @@
|
|||||||
|
|
||||||
- (void) removeHost:(TemporaryHost*)host {
|
- (void) removeHost:(TemporaryHost*)host {
|
||||||
[_managedObjectContext performBlockAndWait:^{
|
[_managedObjectContext performBlockAndWait:^{
|
||||||
Host* managedHost = [self getHostForTemporaryHost:host];
|
Host* managedHost = [self getHostForTemporaryHost:host withHostRecords:[self fetchRecords:@"Host"]];
|
||||||
if (managedHost != nil) {
|
if (managedHost != nil) {
|
||||||
[_managedObjectContext deleteObject:managedHost];
|
[_managedObjectContext deleteObject:managedHost];
|
||||||
[self saveData];
|
[self saveData];
|
||||||
@@ -184,9 +185,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only call from within performBlockAndWait!!!
|
// Only call from within performBlockAndWait!!!
|
||||||
- (Host*) getHostForTemporaryHost:(TemporaryHost*)tempHost {
|
- (Host*) getHostForTemporaryHost:(TemporaryHost*)tempHost withHostRecords:(NSArray*)hosts {
|
||||||
NSArray *hosts = [self fetchRecords:@"Host"];
|
|
||||||
|
|
||||||
for (Host* host in hosts) {
|
for (Host* host in hosts) {
|
||||||
if ([tempHost.uuid isEqualToString:host.uuid]) {
|
if ([tempHost.uuid isEqualToString:host.uuid]) {
|
||||||
return host;
|
return host;
|
||||||
@@ -197,9 +196,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Only call from within performBlockAndWait!!!
|
// Only call from within performBlockAndWait!!!
|
||||||
- (App*) getAppForTemporaryApp:(TemporaryApp*)tempApp {
|
- (App*) getAppForTemporaryApp:(TemporaryApp*)tempApp withAppRecords:(NSArray*)apps {
|
||||||
NSArray *apps = [self fetchRecords:@"App"];
|
|
||||||
|
|
||||||
for (App* app in apps) {
|
for (App* app in apps) {
|
||||||
if ([app.id isEqualToString:tempApp.id] &&
|
if ([app.id isEqualToString:tempApp.id] &&
|
||||||
[app.host.uuid isEqualToString:app.host.uuid]) {
|
[app.host.uuid isEqualToString:app.host.uuid]) {
|
||||||
|
|||||||
@@ -71,6 +71,12 @@
|
|||||||
"idiom" : "ipad",
|
"idiom" : "ipad",
|
||||||
"filename" : "app_icon_152x152_@2x.png",
|
"filename" : "app_icon_152x152_@2x.png",
|
||||||
"scale" : "2x"
|
"scale" : "2x"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"size" : "83.5x83.5",
|
||||||
|
"idiom" : "ipad",
|
||||||
|
"filename" : "app_icon_167x167_@2x.png",
|
||||||
|
"scale" : "2x"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"info" : {
|
"info" : {
|
||||||
|
|||||||
Binary file not shown.
|
After Width: | Height: | Size: 59 KiB |
@@ -17,7 +17,7 @@
|
|||||||
<key>CFBundlePackageType</key>
|
<key>CFBundlePackageType</key>
|
||||||
<string>APPL</string>
|
<string>APPL</string>
|
||||||
<key>CFBundleShortVersionString</key>
|
<key>CFBundleShortVersionString</key>
|
||||||
<string>1.0.2</string>
|
<string>1.0.3</string>
|
||||||
<key>CFBundleSignature</key>
|
<key>CFBundleSignature</key>
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
|
|||||||
+1
-1
Submodule limelight-common-c updated: e1473d7a2d...04b00f9e8a.
Reference in new issue
Block a user