Permalink
Browse files

Query single profiles separately as nearbyProfiles now has less fields

  • Loading branch information...
tomlandia committed Feb 19, 2017
1 parent c30a98b commit 0e687def6d60fd07c0d42e9faa52bac8c0eb1bea
@@ -79,7 +79,7 @@ profilesController = ($scope, $interval, $localStorage, $routeParams, $window, $
profile.profileId isnt $scope.profile.profileId
delete $scope.profile
£managedFields.then (response) -> $scope.managedFields = response.data.fields
#managedFields.then (response) -> $scope.managedFields = response.data.fields
#only included in v3 managed-fields
$scope.sexualPositions = ['', 'Top', 'Bottom', 'Versatile', 'Vers Bottom', 'Vers Top', 'Oral Only']
@@ -104,12 +104,12 @@ cmToLocalUnit = ($localStorage) ->
mToLocalUnit = ($localStorage) ->
(m) ->
if !km
if !m
''
else if $localStorage.localUnits == 'US'
(m*0.000621371).toPrecision(3) + ' miles'
else
m.toPrecision(3) + 'km'
(m/1000).toPrecision(3) + 'km'
lastTimeActive = ->
(timestamp) ->
View
@@ -25,22 +25,6 @@ fuckr.config ['$httpProvider', '$routeProvider', '$compileProvider', ($httpProvi
$compileProvider.imgSrcSanitizationWhitelist(/^\s*(https?|ftp|file|mailto|chrome-extension):/)
]
fuckr.run ['$location', '$injector', '$rootScope', 'authenticate', ($location, $injector, $rootScope, authenticate) ->
$rootScope.runningNodeWebkit = true
if navigator.onLine
#ugly: loading every factory with 'authenticated' event listener
$injector.get(factory) for factory in ['profiles', 'chat', 'updateLocation']
authenticate().then(
-> $location.path('/profiles/')
-> $location.path('/login')
)
window.addEventListener 'offline', -> $rootScope.connectionError = true
else
alert('No Internet connection')
window.addEventListener 'online', ->
authenticate().then -> $rootScope.connectionError = false
]
fuckr.run ['$location', '$injector', '$rootScope', 'authentication', ($location, $injector, $rootScope, authentication) ->
$rootScope.runningNodeWebkit = true
if navigator.onLine
@@ -54,6 +38,6 @@ fuckr.run ['$location', '$injector', '$rootScope', 'authentication', ($location,
else
alert('No Internet connection')
window.addEventListener 'online', ->
authenticate().then ->
authentication.login().then ->
$rootScope.connectionError = false
]
Oops, something went wrong.

0 comments on commit 0e687de

Please sign in to comment.