Merge branch 'maintenance'

This commit is contained in:
Mariotaku Lee 2019-07-05 22:04:40 +09:00
commit b2cf59eaa1
No known key found for this signature in database
GPG Key ID: 15C10F89D7C33535
2 changed files with 10 additions and 4 deletions

View File

@ -228,7 +228,16 @@ object HttpClientFactory {
}
val address = InetSocketAddress.createUnresolved(proxyHost, proxyPort)
builder.proxy(Proxy(Proxy.Type.HTTP, address))
builder.proxyAuthenticator { _, response ->
val b = response.request().newBuilder()
if (response.code() == 407) {
if (username != null && password != null) {
val credential = Credentials.basic(username, password)
b.header("Proxy-Authorization", credential)
}
}
b.build()
}
builder.authenticator { _, response ->
val b = response.request().newBuilder()
if (response.code() == 407) {

View File

@ -312,9 +312,6 @@ object MenuUtils {
R.id.set_nickname -> {
val nick = colorNameManager.getUserNickname(status.user_key)
val df = SetUserNicknameDialogFragment.create(status.user_key, nick)
if (fragment != null) {
df.setTargetFragment(fragment, REQUEST_SET_NICKNAME)
}
df.show(fm, SetUserNicknameDialogFragment.FRAGMENT_TAG)
}
R.id.open_with_account -> {