Browse Source

better support for MSGT_NOTICE

Andrew Dolgov 2 years ago
parent
commit
c455b2fc05

+ 2 - 2
org.fox.ttirc/src/main/AndroidManifest.xml

@@ -1,8 +1,8 @@
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
     package="org.fox.ttirc"
-    android:versionCode="84"
-    android:versionName="1.33" >
+    android:versionCode="85"
+    android:versionName="1.34" >
 
     <uses-permission android:name="android.permission.INTERNET" />
 

+ 5 - 1
org.fox.ttirc/src/main/java/org/fox/ttirc/ChannelFragment.java

@@ -665,7 +665,11 @@ public class ChannelFragment extends Fragment implements OnEditorActionListener,
 				    m_activity.getTheme().resolveAttribute(R.attr.messageBracketColor, tv, true);
 				    int bracketColor = tv.data;
 
-				    span = new SpannableString(ts + " <" + nick + "> " + fmt.getString("message"));
+					if (msg.message_type == Constants.MSGT_NOTICE) {
+						span = new SpannableString(ts + " –" + nick + "– " + fmt.getString("message"));
+					} else {
+						span = new SpannableString(ts + " <" + nick + "> " + fmt.getString("message"));
+					}
 				    //CharSequence message = fmt.getString("message"); 
 				    
 				    //Log.d(TAG, String.format("color=%x [%d]", ColorMap[msg.sender_color], msg.sender_color));

+ 1 - 1
org.fox.ttirc/src/main/res/layout/messagelist_row_notice.xml

@@ -10,7 +10,7 @@
         android:layout_height="wrap_content"
         android:textIsSelectable="true"
         android:text="TextView"
-        android:textStyle="italic" >
+        android:textStyle="normal" >
     </TextView>
 
 </LinearLayout>