|
|
@ -29,7 +29,7 @@ import AppPeopleNearbyTab from "./tabs/peopleNearby"; |
|
|
|
import { ButtonMenuItemOptions } from "../buttonMenu"; |
|
|
|
import { ButtonMenuItemOptions } from "../buttonMenu"; |
|
|
|
import CheckboxField from "../checkboxField"; |
|
|
|
import CheckboxField from "../checkboxField"; |
|
|
|
import { IS_MOBILE_SAFARI } from "../../environment/userAgent"; |
|
|
|
import { IS_MOBILE_SAFARI } from "../../environment/userAgent"; |
|
|
|
import appNavigationController from "../appNavigationController"; |
|
|
|
import appNavigationController, { NavigationItem } from "../appNavigationController"; |
|
|
|
import findUpClassName from "../../helpers/dom/findUpClassName"; |
|
|
|
import findUpClassName from "../../helpers/dom/findUpClassName"; |
|
|
|
import findUpTag from "../../helpers/dom/findUpTag"; |
|
|
|
import findUpTag from "../../helpers/dom/findUpTag"; |
|
|
|
import PeerTitle from "../peerTitle"; |
|
|
|
import PeerTitle from "../peerTitle"; |
|
|
@ -311,6 +311,20 @@ export class AppSidebarLeft extends SidebarSlider { |
|
|
|
|
|
|
|
|
|
|
|
appUsersManager.getTopPeers('correspondents'); |
|
|
|
appUsersManager.getTopPeers('correspondents'); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Focus search input by pressing Escape
|
|
|
|
|
|
|
|
const navigationItem: NavigationItem = { |
|
|
|
|
|
|
|
type: 'global-search-focus', |
|
|
|
|
|
|
|
onPop: () => { |
|
|
|
|
|
|
|
setTimeout(() => { |
|
|
|
|
|
|
|
this.inputSearch.input.focus(); |
|
|
|
|
|
|
|
}, 0); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}, |
|
|
|
|
|
|
|
noHistory: true |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
appNavigationController.pushItem(navigationItem); |
|
|
|
|
|
|
|
|
|
|
|
appStateManager.getState().then(state => { |
|
|
|
appStateManager.getState().then(state => { |
|
|
|
const recentSearch = state.recentSearch || []; |
|
|
|
const recentSearch = state.recentSearch || []; |
|
|
|
for(let i = 0, length = recentSearch.length; i < length; ++i) { |
|
|
|
for(let i = 0, length = recentSearch.length; i < length; ++i) { |
|
|
@ -613,12 +627,13 @@ export class AppSidebarLeft extends SidebarSlider { |
|
|
|
this.updateBtn.classList.add('is-hidden'); |
|
|
|
this.updateBtn.classList.add('is-hidden'); |
|
|
|
this.toolsBtn.parentElement.firstElementChild.classList.toggle('state-back', true); |
|
|
|
this.toolsBtn.parentElement.firstElementChild.classList.toggle('state-back', true); |
|
|
|
|
|
|
|
|
|
|
|
if(!IS_MOBILE_SAFARI && !appNavigationController.findItemByType('global-search')) { |
|
|
|
const navigationType: NavigationItem['type'] = 'global-search'; |
|
|
|
|
|
|
|
if(!IS_MOBILE_SAFARI && !appNavigationController.findItemByType(navigationType)) { |
|
|
|
appNavigationController.pushItem({ |
|
|
|
appNavigationController.pushItem({ |
|
|
|
onPop: () => { |
|
|
|
onPop: () => { |
|
|
|
close(); |
|
|
|
close(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
type: 'global-search' |
|
|
|
type: navigationType |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|