forked from adityapk00/zqwandroid
-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from N1CK145/chat
Added some usefull stuff
- Loading branch information
Showing
13 changed files
with
121 additions
and
81 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
27 changes: 27 additions & 0 deletions
27
app/src/main/java/org/myhush/silentdragon/chat/Addressbook.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
package org.myhush.silentdragon.chat | ||
|
||
object Addressbook { | ||
class Contact { | ||
var addressList: ArrayList<String> = ArrayList() | ||
val messageList: ArrayList<Message> = ArrayList() | ||
var fullname = "" | ||
var nickname = "" | ||
|
||
constructor(fullname: String, nickname: String){ | ||
this.fullname = fullname | ||
this.nickname = nickname | ||
} | ||
constructor(fullname: String, nickname: String, address: String){ | ||
this.fullname = fullname | ||
this.nickname = nickname | ||
this.addressList.add(address) | ||
} | ||
constructor(fullname: String, nickname: String, addressList: ArrayList<String>){ | ||
this.fullname = fullname | ||
this.nickname = nickname | ||
this.addressList = addressList | ||
} | ||
} | ||
|
||
val contactList = ArrayList<Contact>() | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package org.myhush.silentdragon.chat | ||
|
||
import org.myhush.silentdragon.DataModel | ||
|
||
class Message { | ||
var memo = "" | ||
var fromAddress = "" | ||
var toAddress = "" | ||
var messageType = MessageType.SEND | ||
var dateTime: Long = 0 | ||
var txID = "" | ||
var txHeight: Int = -1 | ||
|
||
constructor(fromAddress: String, tx: DataModel.TransactionItem){ | ||
this.memo = tx.memo.toString() | ||
this.txID = tx.txid.toString() | ||
this.dateTime = tx.datetime | ||
this.toAddress = tx.addr | ||
this.fromAddress = fromAddress | ||
} | ||
|
||
} |
6 changes: 6 additions & 0 deletions
6
app/src/main/java/org/myhush/silentdragon/chat/MessageType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
package org.myhush.silentdragon.chat | ||
|
||
enum class MessageType { | ||
SEND, | ||
RECIEVE | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters