diff --git a/js/md.js b/js/md.js
index b1c8511..d8155ea 100644
--- a/js/md.js
+++ b/js/md.js
@@ -54,7 +54,7 @@ var markdown_parser = function(str){
// bold
['/(\\*\\*|__)(.*?)\\1/g', '\\2'],
// emphasis
- ['/(\\*|_)(.*?)\\1/g', '\\2'],
+ ['/(\\*|_)(.*?)\\1/g', '\\2'],
// strike
['/(\\~\\~)(.*?)\\1/g', '\\2'],
// quote
diff --git a/qml/component/MessageBubble.qml b/qml/component/MessageBubble.qml
index 18476fa..ee3fabd 100644
--- a/qml/component/MessageBubble.qml
+++ b/qml/component/MessageBubble.qml
@@ -25,7 +25,8 @@ AvatarContainer {
anchors.margins: 12
wrapMode: Label.Wrap
linkColor: isNotice ? Material.accent : sentByMe ? Material.accent : "white"
- textFormat: contentType === "text/html" ? Text.RichText : Text.StyledText
+// textFormat: contentType === "text/html" ? Text.RichText : Text.StyledText
+ textFormat: Text.StyledText
}
}
}
diff --git a/qml/component/MessageDelegate.qml b/qml/component/MessageDelegate.qml
index f1f3cdf..77e6faa 100644
--- a/qml/component/MessageDelegate.qml
+++ b/qml/component/MessageDelegate.qml
@@ -10,7 +10,7 @@ Item {
width: delegateLoader.width
height: delegateLoader.height
- anchors.right: (eventType === "message" || eventType === "image" || eventType === "file" || eventType === "video" || eventType === "audio") && sentByMe ? parent.right : undefined
+ anchors.right: (eventType === "message" || eventType === "image" || eventType === "file" || eventType === "video" || eventType === "audio" || eventType === "notice") && sentByMe ? parent.right : undefined
anchors.horizontalCenter: (eventType === "state" || eventType === "emote") ? parent.horizontalCenter : undefined
MouseArea {
diff --git a/qml/form/RoomForm.qml b/qml/form/RoomForm.qml
index c1f24ed..52c26ac 100644
--- a/qml/form/RoomForm.qml
+++ b/qml/form/RoomForm.qml
@@ -174,47 +174,23 @@ Item {
bottomPadding: 0
selectByMouse: true
- background: Item{
- Rectangle {
- anchors.fill: parent
- color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
- }
-
- Rectangle {
- id:progressIndicator
-
- height: parent.height
- width: 0
- color: Material.accent
- opacity: 1 - width / inputField.width
-
- NumberAnimation on width {
- id: animation
- from: 0
- to: inputField.width
- duration: 300
- easing.type: Easing.Linear
- }
-
- function animate() { animation.start() }
- }
+ background: Rectangle {
+ color: Material.theme == Material.Light ? "#eaeaea" : "#242424"
}
Keys.onReturnPressed: {
- postMessage(inputField.text)
- progressIndicator.animate()
- inputField.text = ""
+ if (inputField.text) {
+ postMessage(inputField.text)
+ inputField.text = ""
+ }
}
function postMessage(text) {
- if (text.trim().length === 0) {
- return
- }
- if(!currentRoom) {
- return
- }
+ if (text.trim().length === 0) { return }
+ if(!currentRoom) { return }
var PREFIX_ME = '/me '
+ var PREFIX_NOTICE = '/notice '
var PREFIX_RAINBOW = '/rainbow '
var PREFIX_HTML = '/html '
var PREFIX_MARKDOWN = '/md '
@@ -224,6 +200,11 @@ Item {
currentRoom.postMessage("m.emote", text)
return
}
+ if (text.indexOf(PREFIX_NOTICE) === 0) {
+ text = text.substr(PREFIX_NOTICE.length)
+ currentRoom.postMessage("m.notice", text)
+ return
+ }
if (text.indexOf(PREFIX_RAINBOW) === 0) {
text = text.substr(PREFIX_RAINBOW.length)