Skip to content

Commit 317a7f5

Browse files
fix(activity): apply Android view detection in ActivityView child component
The parent Activity.vue now returns androidViews for the tab list when the host is an Android device, but ActivityView.vue was still resolving the current view from viewsStore.views (desktop views). This caused the child to render desktop-view elements (e.g. Top Window Titles) even when the Android Summary tab was selected. Fix: replicate the same runtime bucket check (available.android && !available.window) in ActivityView.vue, reading the host from $route.params.host. Android hosts now get androidViews elements; desktop hosts and the build-time VUE_APP_ON_ANDROID path are unchanged.
1 parent ff5f91b commit 317a7f5

1 file changed

Lines changed: 17 additions & 4 deletions

File tree

src/views/activity/ActivityView.vue

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,10 @@ import 'vue-awesome/icons/times';
5959
import 'vue-awesome/icons/trash';
6060
import 'vue-awesome/icons/undo';
6161
62-
import { mapState } from 'pinia';
6362
import draggable from 'vuedraggable';
6463
65-
import { useViewsStore } from '~/stores/views';
64+
import { useViewsStore, androidViews } from '~/stores/views';
65+
import { useBucketsStore } from '~/stores/buckets';
6666
6767
export default {
6868
name: 'ActivityView',
@@ -73,10 +73,23 @@ export default {
7373
view_id: { type: String, default: 'default' },
7474
},
7575
data() {
76-
return { editing: false };
76+
return { editing: false, bucketsStore: useBucketsStore() };
7777
},
7878
computed: {
79-
...mapState(useViewsStore, ['views']),
79+
views: function () {
80+
// Use Android views when the current host is an Android device.
81+
// Mirrors the same runtime check in Activity.vue so the child view
82+
// resolves its elements from the correct view list instead of always
83+
// falling back to the stored desktop views.
84+
const host = this.$route.params.host;
85+
if (host) {
86+
const available = this.bucketsStore.available(host);
87+
if (available.android && !available.window) {
88+
return androidViews;
89+
}
90+
}
91+
return useViewsStore().views;
92+
},
8093
view: function () {
8194
if (this.view_id == 'default') {
8295
return this.views[0];

0 commit comments

Comments
 (0)