Skip to content

Conversation

@ErikBjare
Copy link
Member

No description provided.

@ErikBjare
Copy link
Member Author

@johan-bjareholt There's still some work left to do, but first I'd like to discuss my approach to dealing with the overlap between Android and desktop stuff. It isn't perfect, but it works and I'm not sure what would be the best way to do it.

state.buckets.browser_buckets.length > 0;
const active_available = state.buckets.afk_buckets.length > 0;
const editor_available = state.buckets.editor_buckets.length > 0;
const android_available = state.buckets.window_buckets[0].includes('android');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, the android bucket just have a normal bucket type?
That certainly makes things confusing.
Let's just hope that no one has 'android' in their hostname lol.
Can't you have something like ".startsWith('aw-watcher-android')" or something instead?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, I think you need to check that "window_buckets" has a length of 1 or more before doing that check to avoid errors on desktop.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wouldn't it be easier if you in the "buckets" vuex instead had a "state.buckets.android_buckets" instead of here?
You could then also exclude the android buckets from the usual window buckets.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, the android bucket just have a normal bucket type?

Yeah, bad initial choice on my part. I expect us to change this eventually in some Great Migration (as with currentwindow, afkstatus).

Let's just hope that no one has 'android' in their hostname lol.
Can't you have something like ".startsWith('aw-watcher-android')" or something instead?

Fixed.

Also, I think you need to check that "window_buckets" has a length of 1 or more before doing that check to avoid errors on desktop.

Fixed.

Wouldn't it be easier if you in the "buckets" vuex instead had a "state.buckets.android_buckets" instead of here?
You could then also exclude the android buckets from the usual window buckets.

Fixed.

@ErikBjare
Copy link
Member Author

ErikBjare commented Apr 28, 2020

@johan-bjareholt Also note the fix in 035d4cc, looks like you broke it before.

@ErikBjare
Copy link
Member Author

@johan-bjareholt I think this should be merged now. There's still stuff that could be nicer but it works and I won't have more time to work on this anytime soon.

@ErikBjare ErikBjare merged commit c535835 into master Apr 28, 2020
@ErikBjare ErikBjare deleted the dev/android-update branch April 28, 2020 15:11
Copy link
Member

@johan-bjareholt johan-bjareholt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, the rough stuff since last time has been fixed so I think it's fine!

},
top_categories: function() {
return this.$store.state.activity.category.top;
visualizations: function() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

window_buckets: [],
editor_buckets: [],
browser_buckets: [],
afk: [],
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants