Commiting with the caption module in a workable state

This commit is contained in:
Chad Pilkey 2015-11-24 15:19:39 -08:00
parent 3036a9740b
commit 0990c2c2ad
3 changed files with 18 additions and 16 deletions

View File

@ -15,11 +15,11 @@ trait CaptionApp {
outGW.send(new SendCaptionHistoryReply(mProps.meetingID, mProps.recorded, msg.requesterID, history))
}
/*
def handleUpdateCaptionInfo(msg: UpdateCaptionInfo) {
}
*/
def handleEditCaptionHistoryRequest(msg: EditCaptionHistoryRequest) {
captionModel.editHistory(msg.startIndex, msg.endIndex, msg.locale, msg.text)
@ -27,8 +27,8 @@ trait CaptionApp {
}
def checkCaptionOwnerLogOut(userId: String) {
var transcript = findTranscriptByOwnerId(userId)
//var transcript = findTranscriptByOwnerId(userId)
if (transcript
//if (transcript
}
}

View File

@ -4,27 +4,27 @@ import scala.collection.mutable.ArrayBuffer
import scala.collection.immutable.HashMap
class CaptionModel {
var transcripts = Map[String, Array[String]]()
var transcripts = Map[String, String]()
def newTranscript(locale: String, ownerId: String) {
transcripts += locale -> Array(locale, "")
// transcripts += locale -> Array(ownerId, "")
}
/*
def findLocaleByOwnerId(userId: String): Option[String] {
transcripts.foreach(t => {
if (t._2[0] == userId) {
return t._1
return Some(t._1)
}
})
return None
}
*/
def getHistory(): Map[String, String] = {
var history = Map[String, String]()
transcripts.foreach(t => {
history += t._1 -> t._2[2]
history += t._1 -> t._2
})
history
@ -40,6 +40,8 @@ class CaptionModel {
transcripts += locale -> (sText + text + eText)
}
} else {
transcripts += locale -> text
}
}
}