Skip to content

Commit

Permalink
for #4905
Browse files Browse the repository at this point in the history
  • Loading branch information
aksonov committed Mar 13, 2020
1 parent 9c87866 commit 43ea97c
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 44 deletions.
2 changes: 0 additions & 2 deletions src/model/EventList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import {PaginableLoadType} from '../store/Transport'
import {waitFor} from '../utils/utils'
import {EventLocationShare, EventLocationShareType} from './EventLocationShare'
import {EventLocationShareEnd} from './EventLocationShareEnd'
import {EventLocationShareNearbyStart} from './EventLocationShareNearbyStart'
import {EventLocationShareNearbyEnd} from './EventLocationShareNearbyEnd'
import {EventUserBeFriend, EventUserBeFriendType} from './EventUserBefriend'

Expand All @@ -34,7 +33,6 @@ export const EventEntity = types.union(
EventFriendInvite,
EventBotInvite,
EventLocationShare,
EventLocationShareNearbyStart,
EventLocationShareNearbyEnd,
EventLocationShareEnd,
EventUserBeFriend
Expand Down
33 changes: 0 additions & 33 deletions src/model/EventLocationShareNearbyStart.ts

This file was deleted.

3 changes: 2 additions & 1 deletion src/model/Profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ export const Profile = types
const res = {...snapshot}
delete res.status
delete res.statusUpdatedAt
delete res.sharesLocation
// delete res.location - need to preserve location because now it is passed only via subscriptions
delete res.subscribedBots
return res
Expand Down Expand Up @@ -98,6 +99,7 @@ export const Profile = types
},
setLocation(location: ILocationSnapshot) {
self._location = Location.create(location)
self.sharesLocation = true
self.maybeUpdateActivity()
},
setFriend: (friend: boolean) => {
Expand All @@ -124,7 +126,6 @@ export const Profile = types
}
if (ownShareType) {
self.ownShareType = ownShareType
self.sharesLocation = ownShareType === FriendShareTypeEnum.ALWAYS
}
superLoad(data)

Expand Down
8 changes: 0 additions & 8 deletions src/utils/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {ILocationSnapshot} from '../model/Location'
import {IMessageIn} from '../model/Message'
import {IEventLocationShareEndData} from '../model/EventLocationShareEnd'
import {IEventLocationShareData} from '../model/EventLocationShare'
import {IEventLocationShareNearbyStartData} from '../model/EventLocationShareNearbyStart'
import {IEventLocationShareNearbyEndData} from '../model/EventLocationShareNearbyEnd'
import {IEventUserBeFriendData} from '../model/EventUserBefriend'

Expand Down Expand Up @@ -487,13 +486,6 @@ export function convertNotification(edge: any): IEventData | {deletedId: string}
id,
}
return locationShareNotification
case 'LocationShareNearbyStartNotification':
const locationShareNearbyStartNotification: IEventLocationShareNearbyStartData = {
time,
sharedNearbyWith: convertProfile({...data.user, _accessedAt: time}),
id,
}
return locationShareNearbyStartNotification
case 'LocationShareNearbyEndNotification':
const locationShareNearbyEndNotification: IEventLocationShareNearbyEndData = {
time,
Expand Down

0 comments on commit 43ea97c

Please sign in to comment.