Adrià Vilanova MartÃnez | 0d92a0c | 2023-11-06 01:37:20 +0100 | [diff] [blame] | 1 | import {kViewUnifiedUserResponseEvent} from '../consts.js'; |
| 2 | |
| 3 | import ResponseEventBasedInfoHandler from './basedOnResponseEvent.js'; |
| 4 | |
| 5 | export default class ProfileInfoHandler extends ResponseEventBasedInfoHandler { |
| 6 | getEvent() { |
| 7 | return kViewUnifiedUserResponseEvent; |
| 8 | } |
| 9 | |
| 10 | async isInfoCurrent() { |
| 11 | return Date.now() - this.info.timestamp < 15 * 1000; |
| 12 | } |
| 13 | |
| 14 | getWaitForCurrentInfoOptions() { |
| 15 | return { |
| 16 | interval: 500, |
| 17 | timeout: 15 * 1000, |
| 18 | }; |
| 19 | } |
| 20 | } |