Skip to content

Commit

Permalink
Stop updating users location when user leaves group
Browse files Browse the repository at this point in the history
  • Loading branch information
Ben Mechen committed Mar 9, 2019
1 parent e5f7e23 commit c61a1b1
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Ride/Controllers/Group/GroupSettingsTableViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ import FacebookLogin
import FacebookCore
import Kingfisher
import Alamofire
import MapKit
import os.log

protocol GroupViewControllerDelegate: class {
Expand All @@ -29,6 +30,7 @@ class GroupSettingsTableViewController: UITableViewController, UITextFieldDelega
var imagePicker = UIImagePickerController()
var group: Group = Group()!
var payoutsEnabled: Bool = false
var locationManager = CLLocationManager()
weak var groupViewControllerDelegate: GroupViewControllerDelegate?

override func viewDidLoad() {
Expand Down Expand Up @@ -112,6 +114,7 @@ class GroupSettingsTableViewController: UITableViewController, UITextFieldDelega
case 3:
if indexPath.row == 0 {
group.removeUser(id: currentUser!.uid)
locationManager.stopUpdatingLocation()
moveToWelcomeController()
}
default:
Expand Down

0 comments on commit c61a1b1

Please sign in to comment.