Skip to content

Commit

Permalink
Suggested in Issue loup-v#13
Browse files Browse the repository at this point in the history
  • Loading branch information
vinceramcesoliveros committed Aug 17, 2018
1 parent 6b3e2ba commit 5e6866d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ class Channels(private val permissionClient: PermissionClient,
}

private fun startMonitoring(request: DataRequest, result: MethodChannel.Result) {
launch(UI) {
result.success(beaconsClient.startMonitoring(request))
}
var operation: BeaconsClient.Operation? = null operation = BeaconsClient.Operation(BeaconsClient.Operation.Kind.Monitoring, request.region, request.inBackground) { result ->} beaconsClient.addRequest(operation!!, request.permission) result.success(null)
}

private fun stopMonitoring(region: RegionModel, result: MethodChannel.Result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ class SharedMonitor(private val application: Application,

fun attachForegroundNotifier(notifier: MonitorNotifier) {
Log.d(Tag, "attach foreground notifier")
this.foregroundNotifier = notifier
this.foregroundNotifier = null

// foreground notifier being attached means background logic is already processed
// or not needed anymore
Expand All @@ -50,7 +50,7 @@ class SharedMonitor(private val application: Application,

fun detachForegroundNotifier(notifier: MonitorNotifier) {
Log.d(Tag, "detach foreground notifier")
check(this.foregroundNotifier == notifier)
// check(this.foregroundNotifier == notifier)
this.foregroundNotifier = null
}

Expand Down
4 changes: 3 additions & 1 deletion lib/channel/channels.dart
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,9 @@ class _Channels {
return;
}

Future<BeaconsResult> startMonitoring(_DataRequest request) async {
/// return `;`
/// It returns nothing, suggest in [Issue #13](https://github.com/loup-v/beacons/issues/13)
Future<void> startMonitoring(_DataRequest request) async {
final response = await _invokeChannelMethod(
_loggingTag,
_channel,
Expand Down

0 comments on commit 5e6866d

Please sign in to comment.