Skip to content

Commit

Permalink
Add session to header info options
Browse files Browse the repository at this point in the history
  • Loading branch information
Slion committed Oct 1, 2023
1 parent 54d0636 commit f049df0
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/src/main/java/acr/browser/lightning/ThemedActivity.kt
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ abstract class ThemedActivity : LocaleAwareActivity() {
super.onCreate(savedInstanceState)
resetPreferences()
}

/**
*
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3364,7 +3364,7 @@ abstract class BrowserActivity : ThemedBrowserActivity(), BrowserView, UIControl
}

/**
*
* Provide the text corresponding to the given [aInfo].
*/
private fun getHeaderInfoText(aInfo: HeaderInfo) : String {

Expand All @@ -3374,6 +3374,7 @@ abstract class BrowserActivity : ThemedBrowserActivity(), BrowserView, UIControl
HeaderInfo.ShortUrl -> Utils.trimmedProtocolFromURL(tab.url)
HeaderInfo.Domain -> Utils.getDisplayDomainName(tab.url)
HeaderInfo.Title -> tab.title
HeaderInfo.Session -> tabsManager.iCurrentSessionName
HeaderInfo.AppName -> getString(R.string.app_name)
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ fun Window.setStatusBarIconsColor(dark: Boolean)


/**
*
* Change the text displayed in task switcher or window title on WSA
*/
fun Activity.setTaskLabel(aLabel: String?) {
Timber.v("setTaskLabel: $aLabel")
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/fulguris/enums/HeaderInfo.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ enum class HeaderInfo(override val value: Int) : IntEnum {
ShortUrl(1),
Domain(2),
Title(3),
AppName(4)
Session(4),
AppName(5)
}


1 change: 1 addition & 0 deletions app/src/main/res/values/arrays.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<item>@string/label_short_url</item>
<item>@string/label_domain</item>
<item>@string/label_title</item>
<item>@string/label_session</item>
<item>@string/label_app_name</item>
</string-array>

Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -709,10 +709,12 @@ See: https://stackoverflow.com/a/42884713/3969362
<string name="log_level_error">Error</string>
<string name="log_level_assert">Assert</string>

<!-- TODO: link to existing strings -->
<string name="label_url">URL</string>
<string name="label_short_url">Short URL</string>
<string name="label_domain">Domain</string>
<string name="label_title">Title</string>
<string name="label_session">Session</string>
<string name="label_app_name">App name</string>


Expand Down

0 comments on commit f049df0

Please sign in to comment.