algolia / algoliasearch-client-android

Algolia Search API Client for Android
MIT License
99 stars 29 forks source link

[refact][stale] Make the `User-Agent` header a static property #553

Closed PLNech closed 5 years ago

PLNech commented 6 years ago

While cleaning up stale branches on the client, I noticed the unmerged commit 71fde63:

[refact] Make the User-Agent header a static property

Why?

  1. It’s a property of the code, not really of the Client instance, so it’s better off static anyway.

  2. It will be required to decouple the Searcher class in InstantSearch from the Index class.

@clement-leprovost @robertmogos is this still relevant? If yes, let's merge it :muscle:

clement-leprovost commented 6 years ago

I remember we did in the Swift client to avoid having the derived libraries (e.g. the Searcher class) have to worry about updating the property at every instantiation; they can do it once and for all in a static initializer. Merge it if you need it. :)

PLNech commented 5 years ago

Considering @q-litzler's work on a new version of the client, closing for now (we'll make sure to cover this in the new version).