MOBILE-3039 messages: Copy plain text on messages

main
Pau Ferrer Ocaña 2019-06-05 11:44:00 +02:00
parent 22a57cc709
commit c5f086e1e8
2 changed files with 12 additions and 2 deletions

View File

@ -176,6 +176,10 @@ ion-app.app-root page-addon-messages-discussion {
@include margin-horizontal(null, -0.5rem); @include margin-horizontal(null, -0.5rem);
border-bottom-color: $item-message-mine-bg; border-bottom-color: $item-message-mine-bg;
} }
&.activated .tail {
border-bottom-color: darken($item-message-mine-bg, 10%);
}
} }
.addon-message-not-mine .tail { .addon-message-not-mine .tail {
@ -184,6 +188,10 @@ ion-app.app-root page-addon-messages-discussion {
border-bottom-color: $item-message-bg; border-bottom-color: $item-message-bg;
} }
.addon-message-not-mine.activated .tail {
border-bottom-color: darken($item-message-bg, 10%);
}
.toolbar-title { .toolbar-title {
img { img {
@include margin-horizontal(null, 6px); @include margin-horizontal(null, 6px);

View File

@ -23,6 +23,7 @@ import { AddonMessagesSyncProvider } from '../../providers/sync';
import { CoreUserProvider } from '@core/user/providers/user'; import { CoreUserProvider } from '@core/user/providers/user';
import { CoreDomUtilsProvider } from '@providers/utils/dom'; import { CoreDomUtilsProvider } from '@providers/utils/dom';
import { CoreUtilsProvider } from '@providers/utils/utils'; import { CoreUtilsProvider } from '@providers/utils/utils';
import { CoreTextUtilsProvider } from '@providers/utils/text';
import { CoreLoggerProvider } from '@providers/logger'; import { CoreLoggerProvider } from '@providers/logger';
import { CoreAppProvider } from '@providers/app'; import { CoreAppProvider } from '@providers/app';
import { coreSlideInOut } from '@classes/animations'; import { coreSlideInOut } from '@classes/animations';
@ -97,7 +98,7 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
private domUtils: CoreDomUtilsProvider, private messagesProvider: AddonMessagesProvider, logger: CoreLoggerProvider, private domUtils: CoreDomUtilsProvider, private messagesProvider: AddonMessagesProvider, logger: CoreLoggerProvider,
private utils: CoreUtilsProvider, private appProvider: CoreAppProvider, private translate: TranslateService, private utils: CoreUtilsProvider, private appProvider: CoreAppProvider, private translate: TranslateService,
@Optional() private svComponent: CoreSplitViewComponent, private messagesOffline: AddonMessagesOfflineProvider, @Optional() private svComponent: CoreSplitViewComponent, private messagesOffline: AddonMessagesOfflineProvider,
private modalCtrl: ModalController) { private modalCtrl: ModalController, private textUtils: CoreTextUtilsProvider) {
this.siteId = sitesProvider.getCurrentSiteId(); this.siteId = sitesProvider.getCurrentSiteId();
this.currentUserId = sitesProvider.getCurrentSiteUserId(); this.currentUserId = sitesProvider.getCurrentSiteUserId();
@ -800,7 +801,8 @@ export class AddonMessagesDiscussionPage implements OnDestroy {
* @param {any} message Message to be copied. * @param {any} message Message to be copied.
*/ */
copyMessage(message: any): void { copyMessage(message: any): void {
this.utils.copyToClipboard(message.smallmessage || message.text || ''); const text = this.textUtils.decodeHTMLEntities(message.smallmessage || message.text || '');
this.utils.copyToClipboard(text);
} }
/** /**