Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions src/ARISWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -351,6 +351,13 @@ - (void) handleARISRequest:(NSURLRequest *)request
}
else if([mainCommand isEqualToString:@"instances"])
{
if(components.count > 1 && [components[1] isEqualToString:@"map"]) {
if(components.count > 2 && [components[2] isEqualToString:@"showNotesOnMap"]) {
Tab *t = [_MODEL_TABS_ tabForType:(@"MAP")];
bool showNotes = [components[4] boolValue];
t.showNotesOnMap = showNotes;
}
}
if(components.count > 1 && [components[1] isEqualToString:@"player"])
{
if(components.count > 2 && [components[2] isEqualToString:@"get"])
Expand Down
1 change: 1 addition & 0 deletions src/arisjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ var ARISJS = function(_ARIS)
_ARIS.setScene = function(scene_id) { _ARIS.enqueueRequest("aris://scene/set/" + scene_id); }
_ARIS.getPlayer = function() { _ARIS.enqueueRequest("aris://player"); }
_ARIS.getTriggerLocation = function(trigger_id) { _ARIS.enqueueRequest("aris://trigger/" + (trigger_id || 0)); }
_ARIS.showNotesOnMap = function(showNotes) { _ARIS.enqueueRequest("aris://instances/map/showNotesOnMap/set/" + showNotes); }

//Call ARIS API directly (USE WITH CAUTION)
_ARIS.callService = function(serviceName, body, auth, callback)
Expand Down
2 changes: 2 additions & 0 deletions src/data_objects/Tab.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
NSString *info;
long sort_index;
long requirement_root_package_id;
bool showNotesOnMap;
}

@property (nonatomic, assign) long tab_id;
Expand All @@ -28,6 +29,7 @@
@property (nonatomic, strong) NSString *info;
@property (nonatomic, assign) long sort_index;
@property (nonatomic, assign) long requirement_root_package_id;
@property (nonatomic, assign) bool showNotesOnMap;

- (id) initWithDictionary:(NSDictionary *)dict;
- (NSString *) serialize;
Expand Down
3 changes: 3 additions & 0 deletions src/data_objects/Tab.m
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ @implementation Tab
@synthesize info;
@synthesize sort_index;
@synthesize requirement_root_package_id;
@synthesize showNotesOnMap;

- (id) init
{
Expand All @@ -33,6 +34,7 @@ - (id) init
self.info = @"";
self.sort_index = 0;
self.requirement_root_package_id = 0;
self.showNotesOnMap = true;
}
return self;
}
Expand All @@ -50,6 +52,7 @@ - (id) initWithDictionary:(NSDictionary *)dict
self.info = [dict validStringForKey:@"info"];
self.sort_index = [dict validIntForKey:@"sort_index"];
self.requirement_root_package_id = [dict validIntForKey:@"requirement_root_package_id"];
self.showNotesOnMap = true;
}
return self;
}
Expand Down
4 changes: 4 additions & 0 deletions src/tab_controllers/map/MapViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,10 @@ - (void) refreshViewFromModel
!modelInstance.infinite_qty &&
modelInstance.qty <= 0
)
||
(
[modelInstance.object_type isEqualToString:@"NOTE"] && !tab.showNotesOnMap
)
) continue;

shouldAdd = YES;
Expand Down