Skip to content

Commit

Permalink
[Version] 🎉 Welcome to 1.00.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Mercandj committed Aug 6, 2018
1 parent 186ec56 commit 4157794
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@ internal class MainActivityPresenter(

override fun onSearchPerformed(search: String) {
screen.showLoader(0)
val url =
if (search.startsWith("https://") || search.startsWith("http://")) search
else "https://www.google.fr/search?q=" + search.replace(" ", "+")
val url = searchToUrl(search)
screen.showUrl(url)
screen.resetSearchInput()
screen.collapseToolbar()
Expand Down Expand Up @@ -51,4 +49,11 @@ internal class MainActivityPresenter(
override fun onToolbarCollapsed(collapsed: Boolean) {
screen.setToolbarContentVisible(!collapsed)
}

private fun searchToUrl(search: String) =
if (search.startsWith("https://") || search.startsWith("http://")) {
search
} else {
"https://www.google.fr/search?q=" + search.replace(" ", "+")
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ class ThemeModule(
private val context: Context
) {

fun provideThemeManager(
): ThemeManager {
fun provideThemeManager(): ThemeManager {
val sharedPreferences = context.getSharedPreferences(
ThemeManagerImpl.PREFERENCE_NAME, Context.MODE_PRIVATE
ThemeManagerImpl.PREFERENCE_NAME,
Context.MODE_PRIVATE
)
return ThemeManagerImpl(sharedPreferences)
}
Expand Down
4 changes: 2 additions & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ task clean(type: Delete) {
}

ext {
appVersionCode = 1_00_03
appVersionName = "1.00.03"
appVersionCode = 1_00_04
appVersionName = "1.00.04"

compileSdkVersion = 28
buildToolsVersion = "27.0.3"
Expand Down

0 comments on commit 4157794

Please sign in to comment.