dont add parent id when adding multiple tabs
This commit is contained in:
+14
-4
@@ -156,7 +156,11 @@ class GeckoTabsApiImpl : GeckoTabsApi {
|
|||||||
bitmap?.let {
|
bitmap?.let {
|
||||||
val bytes = it.toWebPBytes()
|
val bytes = it.toWebPBytes()
|
||||||
withContext(Dispatchers.Main) {
|
withContext(Dispatchers.Main) {
|
||||||
components.flutterEvents.onThumbnailChange(System.currentTimeMillis(), tab.id, bytes) { }
|
components.flutterEvents.onThumbnailChange(
|
||||||
|
System.currentTimeMillis(),
|
||||||
|
tab.id,
|
||||||
|
bytes
|
||||||
|
) { }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} catch (e: Exception) {
|
} catch (e: Exception) {
|
||||||
@@ -180,11 +184,16 @@ class GeckoTabsApiImpl : GeckoTabsApi {
|
|||||||
val selectedTab = components.core.store.state.selectedTabId
|
val selectedTab = components.core.store.state.selectedTabId
|
||||||
|
|
||||||
if (onSelectedTabChange) {
|
if (onSelectedTabChange) {
|
||||||
components.flutterEvents.onSelectedTabChange(System.currentTimeMillis(), selectedTab) { }
|
components.flutterEvents.onSelectedTabChange(
|
||||||
|
System.currentTimeMillis(),
|
||||||
|
selectedTab
|
||||||
|
) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (onTabListChange) {
|
if (onTabListChange) {
|
||||||
components.flutterEvents.onTabListChange(System.currentTimeMillis(), tabs.map { it.id }) { }
|
components.flutterEvents.onTabListChange(
|
||||||
|
System.currentTimeMillis(),
|
||||||
|
tabs.map { it.id }) { }
|
||||||
}
|
}
|
||||||
|
|
||||||
tabs.forEach { tab ->
|
tabs.forEach { tab ->
|
||||||
@@ -529,7 +538,8 @@ class GeckoTabsApiImpl : GeckoTabsApi {
|
|||||||
private = params.private,
|
private = params.private,
|
||||||
source = restoreSource(params.source),
|
source = restoreSource(params.source),
|
||||||
contextId = params.contextId,
|
contextId = params.contextId,
|
||||||
parent = params.parentId?.let { components.core.store.state.findTab(it) },
|
//ParentId currently not supported for multiple tabs
|
||||||
|
//parent = params.parentId?.let { components.core.store.state.findTab(it) },
|
||||||
historyMetadata = params.historyMetadata?.let { metadata ->
|
historyMetadata = params.historyMetadata?.let { metadata ->
|
||||||
HistoryMetadataKey(
|
HistoryMetadataKey(
|
||||||
url = metadata.url,
|
url = metadata.url,
|
||||||
|
|||||||
Reference in New Issue
Block a user