<commit_before>import { Component, OnInit } from '@angular/core';

import { UserFriendState } from '@services/data/user_friend/model/state.enum';
import { GlobalService } from '@services/global.service';
import { EmitService } from '@services/emit.service';
import { ChatIOService } from '@services/utils/socket.io.service';
import { UserFriendService } from '@services/data/user_friend';
import { InfoService } from '@services/info.service';
import { CacheService } from '@services/cache.service';
import { Router } from '@angular/router';

@Component({
  selector: 'cmp-message',
  templateUrl: 'message.html',
  styleUrls: ['./message.scss']
})
export class MessagePage implements OnInit {
  showType = 'msg';

  userid;

  newMessages = [];
  userSet = new Map();
  messageList = [];

  constructor(
    public userFriendService: UserFriendService,
    public globalservice: GlobalService,
    public chatIO: ChatIOService,
    public info: InfoService,
    public cache: CacheService,
    public router: Router,
    private emitService: EmitService,
  ) {
    this.userid = globalservice.userinfo._id;
  }

  ngOnInit(): void {
    // 获取通知列表
    this.getReqFriendList();
    this.info.newMessagesMonitor.subscribe(data => {
      for (let index = data.length - 1; index >= 0; index--) {
        const element = data[index];
        if (this.userSet.has(element._id) && element.messages) {
          const i = this.userSet.get(element._id);<commit_msg>fix: message order not right<commit_after>import { Component, OnInit } from '@angular/core';

import { UserFriendState } from '@services/data/user_friend/model/state.enum';
import { GlobalService } from '@services/global.service';
import { EmitService } from '@services/emit.service';
import { ChatIOService } from '@services/utils/socket.io.service';
import { UserFriendService } from '@services/data/user_friend';
import { InfoService } from '@services/info.service';
import { CacheService } from '@services/cache.service';
import { Router } from '@angular/router';

@Component({
  selector: 'cmp-message',
  templateUrl: 'message.html',
  styleUrls: ['./message.scss']
})
export class MessagePage implements OnInit {
  showType = 'msg';

  userid;

  newMessages = [];
  userSet = new Map();
  messageList = [];

  constructor(
    public userFriendService: UserFriendService,
    public globalservice: GlobalService,
    public chatIO: ChatIOService,
    public info: InfoService,
    public cache: CacheService,
    public router: Router,
    private emitService: EmitService,
  ) {
    this.userid = globalservice.userinfo._id;
  }

  ngOnInit(): void {
    // 获取通知列表
    this.getReqFriendList();
    this.info.newMessagesMonitor.subscribe(data => {
      for (let index = 0; index < data.length; index++) {
        const element = data[index];
        if (this.userSet.has(element._id) && element.messages) {
          const i = this.userSet.get(element._id);
{'fraction_non_alphanumeric': 0.1324435318275154, 'fraction_numerical': 0.001026694045174538, 'mean_word_length': 3.9375, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5503898', 'n_tokens_mistral': 871, 'n_tokens_neox': 874, 'n_words': 208}