[Merge] lp:~phablet-team/history-service/use-subject2-interface-for-title into lp:history-service/staging
Roberto Mier Escandón
roberto.escandon at canonical.com
Thu Oct 20 08:29:20 UTC 2016
Replied comments
Diff comments:
> === modified file 'daemon/historydaemon.cpp'
> --- daemon/historydaemon.cpp 2016-10-13 18:21:23 +0000
> +++ daemon/historydaemon.cpp 2016-10-13 18:21:24 +0000
> @@ -1121,11 +1121,24 @@
> void HistoryDaemon::writeRoomChangesInformationEvents(const QVariantMap &thread, const QVariantMap &interfaceProperties)
> {
> if (!thread.isEmpty()) {
> - // group title
> - QString storedTitle = thread[History::FieldChatRoomInfo].toMap()["Title"].toString();
> - QString newTitle = interfaceProperties["Title"].toString();
> - if (!newTitle.isEmpty() && storedTitle != newTitle) {
> - writeInformationEvent(thread, History::InformationTypeTitleChanged, newTitle);
> + // group subject
> + QString storedSubject = thread[History::FieldChatRoomInfo].toMap()["Subject"].toString();
> + QString newSubject = interfaceProperties["Subject"].toString();
> + if (!newSubject.isEmpty() && storedSubject != newSubject) {
> + //see if we have an actor. If actor is 'me', we have changed that subject
> + QString actor = thread[History::FieldChatRoomInfo].toMap()["Actor"].toString();
> + if (actor == "me") {
> + actor = "You";
This change requires also change same thing in messaging-fw. Do we want it?
> + }
> +
> + //QString prefix = actor.isEmpty() ? "Renamed" : QString("%1 renamed").arg(actor);
> + //writeInformationEvent(thread, QString("%1 the group to '%2'").arg(prefix).arg(newSubject));
done
> +
> + if (actor.isEmpty()) {
> + writeInformationEvent(thread, History::InformationTypeTitleChanged, newSubject);
> + } else {
> + writeInformationEvent(thread, History::InformationTypeTitleChanged, actor, newSubject);
> + }
> }
> }
> }
--
https://code.launchpad.net/~phablet-team/history-service/use-subject2-interface-for-title/+merge/308430
Your team Ubuntu Phablet Team is subscribed to branch lp:~phablet-team/history-service/improve_information_events.
More information about the Ubuntu-reviews
mailing list