mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-14 13:18:15 +02:00
Only show splash and history restore prompts the first time
This commit is contained in:
+14
-8
@@ -32,10 +32,15 @@ import { uiUndoRedo } from './undo_redo';
|
||||
import { uiZoom } from './zoom';
|
||||
import { uiCmd } from './cmd';
|
||||
|
||||
var uiInitCounter = 0;
|
||||
|
||||
|
||||
export function uiInit(context) {
|
||||
|
||||
function render(container) {
|
||||
container
|
||||
.attr('dir', textDirection);
|
||||
|
||||
var map = context.map();
|
||||
|
||||
var hash = behaviorHash(context);
|
||||
@@ -68,13 +73,9 @@ export function uiInit(context) {
|
||||
content
|
||||
.append('div')
|
||||
.attr('id', 'map')
|
||||
.attr('dir', 'ltr')
|
||||
// .attr('dir', 'ltr')
|
||||
.call(map);
|
||||
|
||||
if (textDirection === 'rtl') {
|
||||
d3.select('body').attr('dir', 'rtl');
|
||||
}
|
||||
|
||||
content
|
||||
.call(uiMapInMap(context));
|
||||
|
||||
@@ -268,9 +269,11 @@ export function uiInit(context) {
|
||||
|
||||
context.enter(modeBrowse(context));
|
||||
|
||||
context.container()
|
||||
.call(uiSplash(context))
|
||||
.call(uiRestore(context));
|
||||
if (!uiInitCounter++) {
|
||||
context.container()
|
||||
.call(uiSplash(context))
|
||||
.call(uiRestore(context));
|
||||
}
|
||||
|
||||
var authenticating = uiLoading(context)
|
||||
.message(t('loading_auth'))
|
||||
@@ -284,6 +287,8 @@ export function uiInit(context) {
|
||||
.on('authDone.ui', function() {
|
||||
authenticating.close();
|
||||
});
|
||||
|
||||
uiInitCounter++;
|
||||
}
|
||||
|
||||
|
||||
@@ -316,6 +321,7 @@ export function uiInit(context) {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
window.restart = ui.restart;
|
||||
|
||||
ui.sidebar = uiSidebar(context);
|
||||
|
||||
Reference in New Issue
Block a user