Skip to content
Snippets Groups Projects
Commit 0dde4379 authored by Lukas Mauß's avatar Lukas Mauß
Browse files

Hide sort option 'latest' in comment-list for iOS-/Mac-devices

parent 9d5dea35
No related merge requests found
......@@ -40,7 +40,7 @@
</div>
<mat-menu #sortMenu="matMenu" xPosition="before">
<button mat-icon-button matTooltip="{{ 'comment-list.vote-desc' | translate }}"
<button mat-icon-button *ngIf="isApple === 'false'" matTooltip="{{ 'comment-list.vote-desc' | translate }}"
(click)="sortComments(votedesc)">
<mat-icon [ngClass]="{votedesc: 'up'}[currentSort]">keyboard_arrow_up</mat-icon>
</button>
......
......@@ -11,7 +11,6 @@ import { Vote } from '../../../models/vote';
import { UserRole } from '../../../models/user-roles.enum';
import { Room } from '../../../models/room';
import { RoomService } from '../../../services/http/room.service';
import { VoteService } from '../../../services/http/vote.service';
import { CorrectWrong } from '../../../models/correct-wrong.enum';
import { EventService } from '../../../services/util/event.service';
import { Router } from '@angular/router';
......@@ -33,6 +32,7 @@ export class ModeratorCommentListComponent implements OnInit {
filteredComments: Comment[];
userRole: UserRole;
deviceType: string;
isApple: string;
isLoading = true;
voteasc = 'voteasc';
votedesc = 'votedesc';
......@@ -79,6 +79,7 @@ export class ModeratorCommentListComponent implements OnInit {
});
this.translateService.use(localStorage.getItem('currentLang'));
this.deviceType = localStorage.getItem('deviceType');
this.isApple = localStorage.getItem('isApple');
this.currentSort = this.votedesc;
this.commentService.getRejectedComments(this.roomId)
.subscribe(comments => {
......
......@@ -69,7 +69,7 @@
<mat-menu #sortMenu="matMenu" xPosition="before">
<button mat-menu-item matTooltip="{{ 'comment-list.time' | translate }}"
<button mat-menu-item *ngIf="isApple === 'false'" matTooltip="{{ 'comment-list.time' | translate }}"
(click)="sortComments(time)" aria-labelledby="access_time">
<mat-icon [ngClass]="{time: 'unread-icon'}[currentSort]">access_time</mat-icon>
<span>{{ 'comment-list.sort-list-time' | translate }}</span>
......
......@@ -37,6 +37,7 @@ export class CommentListComponent implements OnInit, OnDestroy {
filteredComments: Comment[];
userRole: UserRole;
deviceType: string;
isApple: string;
isLoading = true;
voteasc = 'voteasc';
votedesc = 'votedesc';
......@@ -107,6 +108,7 @@ export class CommentListComponent implements OnInit, OnDestroy {
this.subscribeCommentStream();
this.translateService.use(localStorage.getItem('currentLang'));
this.deviceType = localStorage.getItem('deviceType');
this.isApple = localStorage.getItem('isApple');
if (this.userRole === 0) {
this.voteService.getByRoomIdAndUserID(this.roomId, userId).subscribe(votes => {
for (const v of votes) {
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment