Esempio n. 1
0
        public DialogStickersViewModel(IProtoService protoService, ICacheService cacheService, ISettingsService settingsService, IEventAggregator aggregator)
            : base(protoService, cacheService, settingsService, aggregator)
        {
            _favoriteSet = new StickerSetViewModel(new StickerSetInfo
            {
                Title = Strings.Resources.FavoriteStickers,
                Name  = "tg/favedStickers"
            });

            _recentSet = new StickerSetViewModel(new StickerSetInfo
            {
                Title = Strings.Resources.RecentStickers,
                Name  = "tg/recentlyUsed"
            });

            //_groupSet = new TLChannelStickerSet
            //{
            //    Set = new TLStickerSet
            //    {
            //        Title = Strings.Resources.GroupStickers,
            //        ShortName = "tg/groupStickers",
            //    },
            //};

            Aggregator.Subscribe(this);

            SavedGifs        = new MvxObservableCollection <MosaicMediaRow>();
            FeaturedStickers = new MvxObservableCollection <TLFeaturedStickerSet>();
            SavedStickers    = new StickerSetCollection();

            //SyncStickers();
            //SyncGifs();

            InstallCommand = new RelayCommand <TLFeaturedStickerSet>(InstallExecute);
        }
        public DialogStickersViewModel(IMTProtoService protoService, ICacheService cacheService, ITelegramEventAggregator aggregator, IStickersService stickersService)
            : base(protoService, cacheService, aggregator)
        {
            _stickersService = stickersService;

            _favedSet = new TLMessagesStickerSet
            {
                Set = new TLStickerSet
                {
                    Title     = Strings.Android.FavoriteStickers,
                    ShortName = "tg/favedStickers"
                }
            };

            _recentSet = new TLMessagesStickerSet
            {
                Set = new TLStickerSet
                {
                    Title     = Strings.Android.RecentStickers,
                    ShortName = "tg/recentlyUsed"
                }
            };

            _groupSet = new TLChannelStickerSet
            {
                Set = new TLStickerSet
                {
                    Title     = Strings.Android.GroupStickers,
                    ShortName = "tg/groupStickers",
                },
            };

            Aggregator.Subscribe(this);

            SavedGifs        = new MvxObservableCollection <IList <MosaicMediaPosition> >();
            FeaturedStickers = new MvxObservableCollection <TLFeaturedStickerSet>();
            SavedStickers    = new StickerSetCollection();

            SyncStickers();
            SyncGifs();

            InstallCommand = new RelayCommand <TLFeaturedStickerSet>(InstallExecute);
        }