Skip to content
Snippets Groups Projects
Commit 65a763be authored by Janne Mareike Koschinski's avatar Janne Mareike Koschinski
Browse files

Minor fixes, updated dependencies

parent b0481f81
No related branches found
No related tags found
No related merge requests found
......@@ -92,7 +92,7 @@ dependencies {
implementation(kotlin("stdlib", "1.2.31"))
// App Compat
withVersion("27.1.0") {
withVersion("27.1.1") {
implementation("com.android.support", "appcompat-v7", version)
implementation("com.android.support", "design", version)
implementation("com.android.support", "customtabs", version)
......@@ -111,7 +111,7 @@ dependencies {
}
// App Arch Persistence
withVersion("1.1.0-beta1") {
withVersion("1.1.0-beta2") {
implementation("android.arch.persistence.room", "runtime", version)
implementation("android.arch.persistence.room", "rxjava2", version)
kapt("android.arch.persistence.room", "compiler", version)
......@@ -119,7 +119,7 @@ dependencies {
}
// App Arch Paging
implementation("android.arch.paging", "runtime", "1.0.0-alpha7") {
implementation("android.arch.paging", "runtime", "1.0.0-beta1") {
exclude(group = "junit", module = "junit")
}
......
......@@ -8,7 +8,8 @@ data class MessageSettings(
val textSize: Int = 14,
val showSeconds: Boolean = false,
val use24hClock: Boolean = true,
val showHostmask: Boolean = false,
val showHostmaskActions: Boolean = false,
val showHostmaskPlain: Boolean = false,
val nicksOnNewLine: Boolean = false,
val timeAtEnd: Boolean = false,
val showAvatars: Boolean = false
......
......@@ -62,9 +62,13 @@ object Settings {
context.getString(R.string.preference_colorize_mirc_key),
MessageSettings.DEFAULT.colorizeMirc
),
showHostmask = getBoolean(
context.getString(R.string.preference_hostmask_key),
MessageSettings.DEFAULT.showHostmask
showHostmaskActions = getBoolean(
context.getString(R.string.preference_hostmask_actions_key),
MessageSettings.DEFAULT.showHostmaskActions
),
showHostmaskPlain = getBoolean(
context.getString(R.string.preference_hostmask_plain_key),
MessageSettings.DEFAULT.showHostmaskPlain
),
nicksOnNewLine = getBoolean(
context.getString(R.string.preference_nicks_on_new_line_key),
......
......@@ -144,7 +144,12 @@ class QuasselMessageRenderer @Inject constructor(
val nick = SpanFormatter.format(
"%s%s",
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, false)
formatNick(
message.content.sender,
self,
highlight,
messageSettings.showHostmaskPlain && messageSettings.nicksOnNewLine
)
)
val content = contentFormatter.format(context, message.content.content, highlight)
val nickName = HostmaskHelper.nick(message.content.sender)
......@@ -240,7 +245,7 @@ class QuasselMessageRenderer @Inject constructor(
combined = SpanFormatter.format(
context.getString(R.string.message_format_join),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender, self, highlight, messageSettings.showHostmaskActions),
message.content.content
),
isMarkerLine = message.isMarkerLine,
......@@ -254,13 +259,16 @@ class QuasselMessageRenderer @Inject constructor(
SpanFormatter.format(
context.getString(R.string.message_format_part_1),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true)
formatNick(message.content.sender, self, highlight, messageSettings.showHostmaskActions)
)
} else {
SpanFormatter.format(
context.getString(R.string.message_format_part_2),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions),
contentFormatter.format(context, message.content.content, highlight)
)
},
......@@ -275,13 +283,16 @@ class QuasselMessageRenderer @Inject constructor(
SpanFormatter.format(
context.getString(R.string.message_format_quit_1),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true)
formatNick(message.content.sender, self, highlight, messageSettings.showHostmaskActions)
)
} else {
SpanFormatter.format(
context.getString(R.string.message_format_quit_2),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions),
contentFormatter.format(context, message.content.content, highlight)
)
},
......@@ -299,14 +310,20 @@ class QuasselMessageRenderer @Inject constructor(
context.getString(R.string.message_format_kick_1),
formatNick(user, false, highlight, false),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true)
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions)
)
} else {
SpanFormatter.format(
context.getString(R.string.message_format_kick_2),
formatNick(user, false, highlight, false),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions),
contentFormatter.format(context, reason, highlight)
)
},
......@@ -325,14 +342,20 @@ class QuasselMessageRenderer @Inject constructor(
context.getString(R.string.message_format_kill_1),
formatNick(user, false, highlight, false),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true)
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions)
)
} else {
SpanFormatter.format(
context.getString(R.string.message_format_kill_2),
formatNick(user, false, highlight, false),
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender,
self,
highlight,
messageSettings.showHostmaskActions),
contentFormatter.format(context, reason, highlight)
)
},
......@@ -406,7 +429,7 @@ class QuasselMessageRenderer @Inject constructor(
"[%d] %s%s: %s",
message.content.type,
formatPrefix(message.content.senderPrefixes, highlight),
formatNick(message.content.sender, self, highlight, true),
formatNick(message.content.sender, self, highlight, messageSettings.showHostmaskActions),
message.content.content
),
isMarkerLine = message.isMarkerLine,
......@@ -452,11 +475,11 @@ class QuasselMessageRenderer @Inject constructor(
highlight: Boolean, showHostmask: Boolean) =
when (messageSettings.colorizeNicknames) {
ColorizeNicknamesMode.ALL ->
formatNickImpl(sender, !highlight, messageSettings.showHostmask && showHostmask)
formatNickImpl(sender, !highlight, showHostmask)
ColorizeNicknamesMode.ALL_BUT_MINE ->
formatNickImpl(sender, !self && !highlight, messageSettings.showHostmask && showHostmask)
formatNickImpl(sender, !self && !highlight, showHostmask)
ColorizeNicknamesMode.NONE ->
formatNickImpl(sender, false, messageSettings.showHostmask && showHostmask)
formatNickImpl(sender, false, showHostmask)
}
private fun formatPrefix(prefix: String,
......
......@@ -43,8 +43,11 @@
<string name="preference_show_prefix_entry_highest">Höchsten Modus</string>
<string name="preference_show_prefix_entry_none">Keine</string>
<string name="preference_hostmask_title">Hostmaske</string>
<string name="preference_hostmask_summary">Zeigt die gesame Spitzname!Ident@Host Information an</string>
<string name="preference_hostmask_actions_title">Hostmaske</string>
<string name="preference_hostmask_actions_summary">Zeigt Ident und Host in Betreten/Verlassen-Nachrichten</string>
<string name="preference_hostmask_plain_title">Hostmaske</string>
<string name="preference_hostmask_plain_summary">Zeigt Ident und Host in normalen Nachrichten</string>
<string name="preference_nicks_on_new_line_title">Separate Spitznamen</string>
<string name="preference_nicks_on_new_line_summary">Zeigt Spitznamen in einer eigenen Zeile an</string>
......
......@@ -99,9 +99,13 @@
<item>NONE</item>
</string-array>
<string name="preference_hostmask_key" translatable="false">hostmask</string>
<string name="preference_hostmask_title">Show Hostmask</string>
<string name="preference_hostmask_summary">Display the full nick!ident@host in messages</string>
<string name="preference_hostmask_actions_key" translatable="false">hostmaskactions_</string>
<string name="preference_hostmask_actions_title">Show Hostmask</string>
<string name="preference_hostmask_actions_summary">Display the full nick!ident@host in join/part/quit messages</string>
<string name="preference_hostmask_plain_key" translatable="false">hostmask_plain</string>
<string name="preference_hostmask_plain_title">Show Hostmask</string>
<string name="preference_hostmask_plain_summary">Display the full nick!ident@host in normal messages</string>
<string name="preference_nicks_on_new_line_key" translatable="false">nicks_on_new_line</string>
<string name="preference_nicks_on_new_line_title">Separate Nicknames</string>
......
......@@ -80,6 +80,17 @@
android:key="@string/preference_show_avatars_key"
android:title="@string/preference_show_avatars_title" />
<SwitchPreference
android:defaultValue="false"
android:dependency="@string/preference_nicks_on_new_line_key"
android:key="@string/preference_hostmask_plain_key"
android:title="@string/preference_hostmask_plain_title" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/preference_hostmask_actions_key"
android:title="@string/preference_hostmask_actions_title" />
<SwitchPreference
android:defaultValue="false"
android:key="@string/preference_time_at_end_key"
......
......@@ -12,7 +12,7 @@ plugins {
dependencies {
implementation(kotlin("stdlib", "1.2.31"))
withVersion("27.1.0") {
withVersion("27.1.1") {
implementation("com.android.support", "support-annotations", version)
}
......
......@@ -26,12 +26,12 @@ dependencies {
implementation(kotlin("stdlib", "1.2.31"))
// App Compat
withVersion("27.1.0") {
withVersion("27.1.1") {
implementation("com.android.support", "appcompat-v7", version)
}
// App Arch Persistence
withVersion("1.1.0-beta1") {
withVersion("1.1.0-beta2") {
implementation("android.arch.persistence.room", "runtime", version)
implementation("android.arch.persistence.room", "rxjava2", version)
kapt("android.arch.persistence.room", "compiler", version)
......@@ -39,7 +39,7 @@ dependencies {
}
// App Arch Paging
implementation("android.arch.paging", "runtime", "1.0.0-alpha7") {
implementation("android.arch.paging", "runtime", "1.0.0-beta1") {
exclude(group = "junit", module = "junit")
}
......
......@@ -14,7 +14,7 @@ android {
dependencies {
// App Compat
withVersion("27.1.0") {
withVersion("27.1.1") {
implementation("com.android.support", "support-v4", version)
implementation("com.android.support", "support-annotations", version)
implementation("com.android.support", "recyclerview-v7", version)
......
......@@ -20,7 +20,7 @@ dependencies {
implementation(kotlin("stdlib", "1.2.31"))
// App Compat
withVersion("27.1.0") {
withVersion("27.1.1") {
implementation("com.android.support", "appcompat-v7", version)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment