@@ -293,9 +293,9 @@ export const useActivityStore = defineStore('activity', {
293293 await this . query_editor_completed ( ) ;
294294 }
295295
296- if ( this . window . available ) {
297- // Perform this last, as it takes the longest
298- await this . query_category_time_by_period ( { ... query_options } ) ;
296+ // Perform this last, as it takes the longest
297+ if ( this . window . available || this . android . available ) {
298+ await this . query_category_time_by_period ( query_options ) ;
299299 }
300300 } else {
301301 console . warn (
@@ -502,22 +502,28 @@ export const useActivityStore = defineStore('activity', {
502502 }
503503 }
504504
505+ const isAndroid = this . buckets . android [ 0 ] !== undefined ;
505506 const categories = useCategoryStore ( ) . classes_for_query ;
506507 // TODO: Clean up call, pass QueryParams in fullDesktopQuery as well
507508 // TODO: Unify QueryOptions and QueryParams
508509 const query = queries . categoryQuery ( {
509- bid_afk : this . buckets . afk [ 0 ] ,
510- bid_window : this . buckets . window [ 0 ] ,
511510 bid_browsers : this . buckets . browser ,
512511 bid_stopwatch :
513512 include_stopwatch && this . buckets . stopwatch . length > 0
514513 ? this . buckets . stopwatch [ 0 ]
515514 : undefined ,
516- // bid_android: this.buckets.android,
517515 categories,
518516 filter_categories,
519517 filter_afk,
520518 always_active_pattern,
519+ ...( isAndroid
520+ ? {
521+ bid_android : this . buckets . android [ 0 ] ,
522+ }
523+ : {
524+ bid_afk : this . buckets . afk [ 0 ] ,
525+ bid_window : this . buckets . window [ 0 ] ,
526+ } ) ,
521527 } ) ;
522528 const result = await getClient ( ) . query ( [ period ] , query , {
523529 verbose : true ,
0 commit comments